=================================================================== RCS file: /cvs/palm/Palm-Keyring/examples/example2.pl,v retrieving revision 1.1 retrieving revision 1.3 diff -u -r1.1 -r1.3 --- palm/Palm-Keyring/examples/example2.pl 2007/01/28 16:17:54 1.1 +++ palm/Palm-Keyring/examples/example2.pl 2007/01/31 04:17:15 1.3 @@ -1,17 +1,22 @@ #!/usr/bin/perl +# $RedRiver: example2.pl,v 1.2 2007/01/30 04:59:55 andrew Exp $ use strict; use warnings; -use diagnostics; -use lib 'lib'; +use Palm::PDB; use Palm::Keyring; -my $pdb = new Palm::Keyring; +my $pdb = new Palm::PDB; -use YAML; +$pdb->Load("Keys-Gtkr-example.PDB"); +$pdb->Password('12345'); -$pdb->Load("Keys-GtkrNEW.PDB"); -$pdb->Decrypt('12345'); +foreach (0..$#{ $pdb->{'records'} }) { + next if $_ == 0; + my $rec = $pdb->{'records'}->[$_]; + my $acct = $pdb->Decrypt($rec); -print Dump $pdb; - + print join ":", $rec->{'name'} , $acct->{'account'}, + $acct->{'password'}, $acct->{'notes'}; + print "\n"; +}