aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost/Schema/Type.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fripost/Schema/Type.pm')
-rw-r--r--lib/Fripost/Schema/Type.pm48
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/Fripost/Schema/Type.pm b/lib/Fripost/Schema/Type.pm
new file mode 100644
index 0000000..bfa8f73
--- /dev/null
+++ b/lib/Fripost/Schema/Type.pm
@@ -0,0 +1,48 @@
+package Fripost::Schema::Type;
+
+use 5.010_000;
+use warnings;
+use strict;
+
+use Exporter;
+
+our $VERSION = '0.01';
+
+our @EXPORT = qw/MAILBOX DOMAIN ALIAS/;
+our @ISA = qw(Exporter);
+
+use constant {
+ MAILBOX => 0,
+ DOMAIN => 1,
+ ALIAS => 2
+};
+
+# Change the context of the object.
+sub _set_type {
+ $_[0]->{_type} = $_[1];
+ return $_[0];
+}
+
+
+=head1 NAME
+
+Fripost::Schema::Type - Context of Fripost::Schema objects.
+
+=head1 AUTHOR
+
+Guilhem Moulin C<< <guilhem at fripost.org> >>
+
+=head1 COPYRIGHT
+
+Copyright 2012 Guilhem Moulin, all rights reserved.
+
+=head1 LICENSE
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as perl itself.
+
+=cut
+
+1; # End of Type.pm
+
+__END__