SVN: toys/rsget.pl/RSGet: Curl.pm FileList.pm Get.pm Line.pm ListAdder.pm

sparky sparky at pld-linux.org
Thu Aug 12 15:43:56 CEST 2010


Author: sparky
Date: Thu Aug 12 15:43:55 2010
New Revision: 11777

Modified:
   toys/rsget.pl/RSGet/Curl.pm
   toys/rsget.pl/RSGet/FileList.pm
   toys/rsget.pl/RSGet/Get.pm
   toys/rsget.pl/RSGet/Line.pm
   toys/rsget.pl/RSGet/ListAdder.pm
Log:
- corrected hadd() usage


Modified: toys/rsget.pl/RSGet/Curl.pm
==============================================================================
--- toys/rsget.pl/RSGet/Curl.pm	(original)
+++ toys/rsget.pl/RSGet/Curl.pm	Thu Aug 12 15:43:55 2010
@@ -301,7 +301,7 @@
 	my $get_obj = $supercurl->{get_obj};
 	my $time = time;
 
-	hadd $supercurl,
+	hadd %$supercurl,
 		time_start => $time,
 		time_stamp => [ $time, 0, $time, 0, $time, 0 ],
 		size_start => 0,
@@ -384,7 +384,7 @@
 			seek $f_out, $start, SEEK_SET;
 			$get_obj->log( "Continuing at " . bignum( $start ) . $old_msg );
 
-			hadd $supercurl,
+			hadd %$supercurl,
 				file => $f_out,
 				size_start => $start,
 				size_got => $start,

Modified: toys/rsget.pl/RSGet/FileList.pm
==============================================================================
--- toys/rsget.pl/RSGet/FileList.pm	(original)
+++ toys/rsget.pl/RSGet/FileList.pm	Thu Aug 12 15:43:55 2010
@@ -126,7 +126,7 @@
 		my $val = $data{ $key };
 		if ( $key =~ /^(options|globals|clones)/ ) {
 			my $hash = $save_uri->{ $key } ||= {};
-			hadd $hash, %{ $val };
+			hadd %$hash, %{ $val };
 		} else {
 			$save_uri->{ $key } = $val;
 		}
@@ -357,8 +357,8 @@
 			my $options = $decoded{ $uri }->[1];
 
 			$cmd = $save->{cmd} if $save->{cmd};
-			hadd $globals, %{$save->{globals}} if $save->{globals};
-			hadd $options, %{$save->{options}} if $save->{options};
+			hadd %$globals, %{$save->{globals}} if $save->{globals};
+			hadd %$options, %{$save->{options}} if $save->{options};
 
 			if ( my $links = $save->{links} ) {
 				push @new, map { "ADD: $_\n" } @$links;
@@ -367,7 +367,7 @@
 			}
 
 			if ( my $clones = $save->{clones} ) {
-				hadd \%decoded, %{ $clones };
+				hadd %decoded, %{ $clones };
 				$update = 2;
 			}
 			delete $decoded{ $uri } if $save->{delete};
@@ -380,7 +380,7 @@
 		foreach my $uri ( keys %decoded ) {
 			if ( $all_uri{ $uri } ) {
 				warn "URI: $uri repeated, removing second one\n";
-				#hadd $options, %{ $all_uri{ $uri }->[1] };
+				#hadd %$options, %{ $all_uri{ $uri }->[1] };
 				#$all_uri{ $uri }->[1] = $options;
 				delete $decoded{ $uri };
 			} else {

Modified: toys/rsget.pl/RSGet/Get.pm
==============================================================================
--- toys/rsget.pl/RSGet/Get.pm	(original)
+++ toys/rsget.pl/RSGet/Get.pm	Thu Aug 12 15:43:55 2010
@@ -79,7 +79,7 @@
 	if ( verbose( 2 ) or $cmd eq "get" ) {
 		my $outifstr = $outif ? "[$outif]" :  "";
 
-		hadd $self,
+		hadd %$self,
 			_line => new RSGet::Line( "[$getter->{short}]$outifstr " );
 		$self->print( "start" );
 		$self->linedata();
@@ -420,7 +420,7 @@
 	$info{asize} =~ s/\s+//g if $info{asize};
 	RSGet::FileList::save( $self->{_uri}, options => \%info );
 
-	hadd( $self->{_opts}, %info );
+	hadd( %{$self->{_opts}}, %info );
 	$self->bestinfo();
 
 	return 0 unless $self->{_cmd} eq "check";

Modified: toys/rsget.pl/RSGet/Line.pm
==============================================================================
--- toys/rsget.pl/RSGet/Line.pm	(original)
+++ toys/rsget.pl/RSGet/Line.pm	Thu Aug 12 15:43:55 2010
@@ -208,7 +208,7 @@
 
 sub status
 {
-	hadd( \%status, @_ );
+	hadd( %status, @_ );
 }
 
 END {

Modified: toys/rsget.pl/RSGet/ListAdder.pm
==============================================================================
--- toys/rsget.pl/RSGet/ListAdder.pm	(original)
+++ toys/rsget.pl/RSGet/ListAdder.pm	Thu Aug 12 15:43:55 2010
@@ -129,8 +129,8 @@
 				$self->{select_clone} = 0;
 			
 				$line->{cmd} = $save->{cmd} if $save->{cmd};
-				hadd $globals, %{$save->{globals}} if $save->{globals};
-				hadd $options, %{$save->{options}} if $save->{options};
+				hadd %$globals, %{$save->{globals}} if $save->{globals};
+				hadd %$options, %{$save->{options}} if $save->{options};
 
 				if ( my $links = $save->{links} ) {
 					my @new;
@@ -146,7 +146,7 @@
 					splice @$lines, $i+1, 0, @new;
 				}
 				if ( my $clones = $save->{clones} ) {
-					hadd $uris, %$clones;
+					hadd %$uris, %$clones;
 					# will check new ones next time
 				}
 				if ( $save->{delete} ) {


More information about the pld-cvs-commit mailing list