Created
November 4, 2009 12:33
-
-
Save deppp/226008 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package App::Person; | |
use Moose; | |
use MooseX::Storage; | |
with Storage (format => 'JSON', io => 'File'); | |
has ['firstname', 'lastname'] => ( isa => 'Str' , is => 'rw' ); | |
package main; | |
use Data::Dump 'dump'; | |
my $person = App::Person->new(firstname => 'Mikhail', lastname => 'Maluyk'); | |
my $data = $person->pack; | |
dump $data; | |
$person->store('person.json'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment