Author: sparky
Date: Wed Sep 30 00:34:47 2009
New Revision: 10638

Modified:
   toys/rsget.pl/RSGet/Tools.pm   (contents, props changed)
Log:
- add set_rev


Modified: toys/rsget.pl/RSGet/Tools.pm
==============================================================================
--- toys/rsget.pl/RSGet/Tools.pm        (original)
+++ toys/rsget.pl/RSGet/Tools.pm        Wed Sep 30 00:34:47 2009
@@ -6,12 +6,23 @@
 
 require Exporter;
 @ISA = qw(Exporter);
-...@export = qw(s2string bignum de_ml hadd hprint p isotime require_prog
+...@export = qw(set_rev s2string bignum de_ml hadd hprint p isotime 
require_prog
        dump_to_file randomize %getters %settings);
 @EXPORT_OK = qw();
 
 our %settings;
 our %getters;
+our %revisions;
+
+sub set_rev($)
+{
+       my @id = split /\s+/, shift;
+       my $pm = $id[1];
+       my $rev = $id[2];
+       $pm =~ s/\.pm$//;
+       $revisions{ $pm } = 0 | $rev;
+}
+set_rev qq$Id$;
 
 sub s2string($)
 {
@@ -55,8 +66,15 @@
 sub hprint(%)
 {
        my $h = shift;
-       foreach ( keys %$h ) {
-               p "$_ => $h->{$_}";
+       foreach my $k ( keys %$h ) {
+               my $v = $h->{ $k };
+               if ( not defined $v ) {
+                       $v = "undef";
+               } elsif ( $v =~ /^\d+$/ ) {
+               } else {
+                       $v = '"' . $v . '"';
+               }
+               p "$k => $v";
        }
 }
 
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to