1MooseX::Storage::IO::FiUlsee(r3)Contributed Perl DocumenMtoaotsieoXn::Storage::IO::File(3)
2
3
4

NAME

6       MooseX::Storage::IO::File - A basic File I/O role
7

SYNOPSIS

9         package Point;
10         use Moose;
11         use MooseX::Storage;
12
13         with Storage('format' => 'JSON', 'io' => 'File');
14
15         has 'x' => (is => 'rw', isa => 'Int');
16         has 'y' => (is => 'rw', isa => 'Int');
17
18         1;
19
20         my $p = Point->new(x => 10, y => 10);
21
22         ## methods to load/store a class
23         ## on the file system
24
25         $p->store('my_point.json');
26
27         my $p2 = Point->load('my_point.json');
28

METHODS

30       load ($filename)
31       store ($filename)
32
33   Introspection
34       meta
35

BUGS

37       All complex software has bugs lurking in it, and this module is no
38       exception. If you find a bug please either email me, or add the bug to
39       cpan-RT.
40

AUTHOR

42       Chris Prather <chris.prather@iinteractive.com>
43
44       Stevan Little <stevan.little@iinteractive.com>
45
47       Copyright 2007-2008 by Infinity Interactive, Inc.
48
49       <http://www.iinteractive.com>
50
51       This library is free software; you can redistribute it and/or modify it
52       under the same terms as Perl itself.
53
54
55
56perl v5.12.0                      2009-07-14      MooseX::Storage::IO::File(3)
Impressum