some cleanup
[gitmo/MooseX-Types-Path-Class.git] / t / 02.getopt.t
index 047ccdf..f3feae5 100644 (file)
@@ -1,50 +1,55 @@
 
 use warnings FATAL => 'all';
 use strict;
-use English qw(-no_match_vars);
 
 eval { require MooseX::Getopt; };
-if ($EVAL_ERROR) {
+if ($@) {
     plan( skip_all => 'MooseX::Getopt required for this test' );
 }
 
-package Foo;
-use Moose;
-with 'MooseX::Getopt';
-use MooseX::Types::Path::Class;
-
-has 'dir' => (
-    is       => 'ro',
-    isa      => 'Path::Class::Dir',
-    required => 1,
-    coerce   => 1,
-);
-
-has 'file' => (
-    is       => 'ro',
-    isa      => 'Path::Class::File',
-    required => 1,
-    coerce   => 1,
-);
-
-package Bar;
-use Moose;
-with 'MooseX::Getopt';
-use MooseX::Types::Path::Class qw( Dir File );
-
-has 'dir' => (
-    is       => 'ro',
-    isa      => Dir,
-    required => 1,
-    coerce   => 1,
-);
-
-has 'file' => (
-    is       => 'ro',
-    isa      => File,
-    required => 1,
-    coerce   => 1,
-);
+{
+
+    package Foo;
+    use Moose;
+    with 'MooseX::Getopt';
+    use MooseX::Types::Path::Class;
+
+    has 'dir' => (
+        is       => 'ro',
+        isa      => 'Path::Class::Dir',
+        required => 1,
+        coerce   => 1,
+    );
+
+    has 'file' => (
+        is       => 'ro',
+        isa      => 'Path::Class::File',
+        required => 1,
+        coerce   => 1,
+    );
+}
+
+{
+
+    package Bar;
+    use Moose;
+    with 'MooseX::Getopt';
+    use MooseX::Types::Path::Class qw( Dir File );
+
+    has 'dir' => (
+        is       => 'ro',
+        isa      => Dir,
+        required => 1,
+        coerce   => 1,
+    );
+
+    has 'file' => (
+        is       => 'ro',
+        isa      => File,
+        required => 1,
+        coerce   => 1,
+    );
+}
 
 package main;