has storage => (
is => 'rw',
does => 'Email::Archive::Storage',
- handles => [qw/
- store
- retrieve
- search
- /],
+ handles => {
+ store => 'store',
+ retrieve => 'retrieve',
+ connect => 'storage_connect',
+ },
lazy => 1,
default => sub { Email::Archive::Storage::DBI->new }
);
);
my $e = Email::Archive->new();
-$e->storage->db_connect('dbi:SQLite:dbname=test.db');
+$e->connect('dbi:SQLite:dbname=test.db');
print "sending @{[$email->as_string]}\n";
$e->store($email);