Add a role for MooseX::Storage
Tomas Doran [Sun, 10 Jan 2010 22:41:15 +0000 (22:41 +0000)]
lib/Gitalist/Serializeable.pm [new file with mode: 0644]

diff --git a/lib/Gitalist/Serializeable.pm b/lib/Gitalist/Serializeable.pm
new file mode 100644 (file)
index 0000000..c430127
--- /dev/null
@@ -0,0 +1,32 @@
+package Gitalist::Serializeable;
+use Moose::Role;
+use namespace::autoclean;
+use MooseX::Storage;
+
+with Storage( traits => [qw|OnlyWhenBuilt|] );
+
+1;
+
+=head1 NAME
+
+Gitalist::Serializeable
+
+=head1 SYNOPSIS
+
+  class Gitalist::Git::Foo with Gitalist::Serializeable {
+     ...
+  }
+  
+=head1 DESCRIPTION
+
+Role which applies a customised L<MooseX::Storage>.
+
+=head1 AUTHORS
+
+See L<Gitalist> for authors.
+
+=head1 LICENSE
+
+See L<Gitalist> for the license.
+
+=cut