--- trunk/lib/Frey/DelIcioUs.pm 2008/11/05 21:12:31 315 +++ trunk/lib/Frey/DelIcioUs.pm 2008/11/06 17:58:20 323 @@ -1,27 +1,22 @@ package Frey::DelIcioUs; use Moose; -with 'Frey::Config'; with 'Frey::Storage'; +use LWP::UserAgent; +use XML::Simple; +use Data::Dump qw/dump/; + has 'username' => ( is => 'rw', isa => 'Str', required => 1, - default => sub { - my $self = shift; - $self->config->{username}; - }, ); has 'password' => ( - is => 'rw', + is => 'ro', isa => 'Str', required => 1, - default => sub { - my $self = shift; - $self->config->{password}; - }, ); has 'path' => ( @@ -33,10 +28,6 @@ } ); -use LWP::UserAgent; -use XML::Simple; -use Data::Dump qw/dump/; - sub data { my $self = shift; @@ -55,7 +46,7 @@ warn substr($content,0,100), ' ... ', substr($content,-100); my $posts = XMLin( $content ); warn dump( $posts ); - $self->store( $self->path, $posts ); + $self->store( $self->path . '.yml', $posts ); return $posts; }