[BACK]Return to example3.pl CVS log [TXT][DIR] Up to [local] / palm / Palm-Keyring / examples

Diff for /palm/Palm-Keyring/examples/example3.pl between version 1.2 and 1.4

version 1.2, 2007/01/30 04:59:55 version 1.4, 2007/02/10 16:24:16
Line 1 
Line 1 
 #!/usr/bin/perl  #!/usr/bin/perl
   # $RedRiver$
   ########################################################################
   # palmkeyring.pl *** a command line client for Keyring databases.
   #
   # 2007.02.10 #*#*# andrew fresh <andrew@cpan.org>
   ########################################################################
   # Copyright (C) 2007 by Andrew Fresh
   #
   # This program is free software; you can redistribute it and/or modify
   # it under the same terms as Perl itself.
   ########################################################################
 use strict;  use strict;
 use warnings;  use warnings;
   
 use Getopt::Long;  use Getopt::Long;
 Getopt::Long::Configure('bundling');  Getopt::Long::Configure('bundling');
 use Term::ReadLine;  use Term::ReadLine;
Line 56 
Line 68 
                         $matched++ if uc($category) eq uc($cat);                          $matched++ if uc($category) eq uc($cat);
                 }                  }
                 foreach my $name (@{ $Names}) {                  foreach my $name (@{ $Names}) {
                         $matched++ if uc($r->{'data'}) eq uc($name);                          $matched++ if uc($r->{'name'}) eq uc($name);
                 }                  }
                 next if ( @{ $Categories } || @{ $Names } ) && not $matched;                  next if ( @{ $Categories } || @{ $Names } ) && not $matched;
   
                 # XXX Fix up formatting                  # XXX Fix up formatting
                 print $r->{'data'} .                  print $r->{'name'} .
                         ":" .                          ":" .
                         $r->{'category'} .                          $r->{'category'} .
                         ":" .                          ":" .
Line 96 
Line 108 
                         $matched++ if uc($category) eq uc($cat);                          $matched++ if uc($category) eq uc($cat);
                 }                  }
                 foreach my $name (@{ $Names}) {                  foreach my $name (@{ $Names}) {
                         $matched++ if uc($r->{'data'}) eq uc($name);                          $matched++ if uc($r->{'name'}) eq uc($name);
                 }                  }
                 next if ( @{ $Categories } || @{ $Names } ) && not $matched;                  next if ( @{ $Categories } || @{ $Names } ) && not $matched;
   
         my $a = $pdb->Decrypt($r);          my $a = $pdb->Decrypt($r);
   
                 # XXX Fix up formatting                  # XXX Fix up formatting
                 print $r->{'data'} .  "\n\t" .                  print $r->{'name'} .  "\n\t" .
                         "Category: " . $category .  "\n\t" .                          "Category: " . $category .  "\n\t" .
                         "Account:  " . $a->{'account'} .  "\n\t" .                          "Account:  " . $a->{'account'} .  "\n\t" .
                         "Password: " . $a->{'password'} .  "\n";                          "Password: " . $a->{'password'} .  "\n";

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>