use JSON;
our $VERSION = '1.0.0';
sub new {
my ( $class, %args ) = @_;
my $home_dir = File::HomeDir->my_home;
my $file = File::Spec->catfile( $home_dir, '.password_manager.json' );
$self->{data_file}': $!";
local $/;
my $json = <$fh>;
close $fh;
$self->{passwords} = decode_json($json) if $json;
}
}
sub _save_passwords {
my ($self) = @_;
', $self->{data_file} or die "Could not open file '$self->{data_file}': $!";
print $fh encode_json($self->{passwords});
close $fh;
}
1;
__END__
=encoding utf-8
=head1 NAME
password_manager