summaryrefslogtreecommitdiffstats
path: root/t/lib/FileAttributes.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-07-19 19:21:54 -0500
committerJesse Luehrs <doy@tozt.net>2010-07-19 19:21:54 -0500
commitd1bab5d4a5ea4100803c871461c62744767c514b (patch)
tree1e596286d921bdd58e2bc61eef5aff1c91a70e1b /t/lib/FileAttributes.pm
parent636f22f307ff0dc94a2c2ec23d49c872ecddbc02 (diff)
downloadmoosex-exporter-easy-master.tar.gz
moosex-exporter-easy-master.zip
a few more testsHEADmaster
Diffstat (limited to 't/lib/FileAttributes.pm')
-rw-r--r--t/lib/FileAttributes.pm29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/lib/FileAttributes.pm b/t/lib/FileAttributes.pm
new file mode 100644
index 0000000..04e6f2e
--- /dev/null
+++ b/t/lib/FileAttributes.pm
@@ -0,0 +1,29 @@
+package FileAttributes;
+use MooseX::Exporter::Easy;
+use MooseX::Types::Path::Class qw(File Dir);
+
+with_meta has_file => sub {
+ my ($meta, $name, %options) = @_;
+ $meta->add_attribute(
+ $name,
+ is => 'ro',
+ isa => File,
+ coerce => 1,
+ %options,
+ );
+};
+
+with_meta has_dir => sub {
+ my ($meta, $name, %options) = @_;
+ $meta->add_attribute(
+ $name,
+ is => 'ro',
+ isa => Dir,
+ coerce => 1,
+ %options,
+ );
+};
+
+export;
+
+1;