=================================================================== RCS file: /cvs/palm/Palm-Keyring/examples/example3.pl,v retrieving revision 1.8 retrieving revision 1.11 diff -u -r1.8 -r1.11 --- palm/Palm-Keyring/examples/example3.pl 2008/02/27 23:54:02 1.8 +++ palm/Palm-Keyring/examples/example3.pl 2008/09/17 15:49:50 1.11 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $RedRiver: example3.pl,v 1.7 2007/12/04 03:37:48 andrew Exp $ +# $RedRiver: example3.pl,v 1.10 2008/03/05 22:04:46 andrew Exp $ ######################################################################## # palmkeyring.pl *** a command line client for Keyring databases. # @@ -17,8 +17,6 @@ Getopt::Long::Configure('bundling'); use Term::ReadLine; -use YAML; - use Palm::PDB; use Palm::Keyring; @@ -95,10 +93,8 @@ sub show_items { get_password() || die "Couldn't decrypt file!"; - foreach (0..$#{ $pdb->{'records'} }) { - my $r = $pdb->{'records'}->[$_]; - + my $r = $pdb->{'records'}->[$_]; my $category = $pdb->{'appinfo'}->{'categories'}->[ $r->{'category'} ]->{'name'}; @@ -111,11 +107,11 @@ } next if ( @{ $Categories } || @{ $Names } ) && not $matched; - my $a = $pdb->Decrypt($r); - $matched = 0; + my $a = $pdb->Decrypt($r); + $matched = 0; foreach my $account (@{ $Accounts }) { - $matched++ if uc($r->{plaintext}->{1}->{data}) eq uc($account); + $matched++ if uc($a->{1}->{data}) eq uc($account); } next if ( @{ $Accounts } ) && not $matched;