the "" accidentally slipped in when trying stuff
Todd Hepler [Tue, 27 Mar 2012 17:55:04 +0000 (12:55 -0500)]
::MoreCoercions seems to be the way overloaded
stringify-able object will coerce

lib/MooseX/Types/Path/Class.pm

index 50e2e99..f46dbbe 100644 (file)
@@ -33,13 +33,13 @@ subtype NonExistingDir, as Dir,
 
 for my $type ( 'Path::Class::Dir', Dir, ExistingDir, NonExistingDir ) {
     coerce $type,
-        from Str,      via { Path::Class::Dir->new("$_") },
+        from Str,      via { Path::Class::Dir->new($_) },
         from ArrayRef, via { Path::Class::Dir->new(@$_) };
 }
 
 for my $type ( 'Path::Class::File', File, ExistingFile, NonExistingFile ) {
     coerce $type,
-        from Str,      via { Path::Class::File->new("$_") },
+        from Str,      via { Path::Class::File->new($_) },
         from ArrayRef, via { Path::Class::File->new(@$_) };
 }