anages backimap status
use Moose;
use MooseX::Storage;
with Storage( 'format' => 'JSON' );
# Storage prereq
use JSON::Any();
use version();
use English qw( -no_match_vars );
has timestamp => (
as storage => (
is => 'ro',
isa => 'App::backimap::Storage',
);
my $FILENAME = 'backimap.json';
# Extra status initialization is not documented in POD.
sub BUILD {
my $self = shift;
->storage;
if ( $self->storage->init ) {
$self->save();
}
else {
my $json = $self->storage->get($FILENAME);
# Do not check package if version is alpha (CPAN: #683