diff options
Diffstat (limited to 'bin/client')
-rw-r--r-- | bin/client | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -6,8 +6,9 @@ use DeWeave::Storage; use DeWeave::Crypto; use DeWeave::Collection; use Getopt::Long; +use Class::MOP; -my ($server,$username,$password,$sync_key); +my ($server,$username,$password,$sync_key,$what); { my $p = Getopt::Long::Parser->new( @@ -38,12 +39,11 @@ my $crypto = DeWeave::Crypto->new({ sync_key => $sync_key, }); -use Data::Dump 'pp'; -my $data = $storage->get_item('storage/tabs'); +$what=ucfirst(shift); +my $class = "DeWeave::Collection::$what"; +Class::MOP::load_class($class); -my $foo = DeWeave::Collection->from_json( - $data, - $crypto, -); +my $foo = $class->fetch($storage,$crypto); + +print $_->as_string,"\n" for @{$foo->items}; -print pp $foo; |