X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FBase.pm;h=b37223cfa1bf2a5626336da7bb5b14620f7b38c8;hb=dee01f3b2fddd1a855d37883592de9ecc5d9276c;hp=b731ed8fec726ab4e0304695c0b3076798eafaa1;hpb=d372611d61d0051ccbda0744b38d2244188fa3f8;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index b731ed8..b37223c 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -922,7 +922,7 @@ L. =cut -# ensure that a peice of object data is a valid arrayref, creating +# ensure that a piece of object data is a valid arrayref, creating # an empty one or encapsulating whatever's there. sub _ensure_arrayref { my $self = shift; @@ -1341,7 +1341,7 @@ sub _validate_classes { foreach my $c (@classes) { # components default to being under the DBIx::Class namespace unless they - # are preceeded with a '+' + # are preceded with a '+' if ( $key =~ m/component/ && $c !~ s/^\+// ) { $c = 'DBIx::Class::' . $c; } @@ -1365,7 +1365,7 @@ sub _find_file_in_inc { foreach my $prefix (@INC) { my $fullpath = File::Spec->catfile($prefix, $file); return $fullpath if -f $fullpath - # abs_path throws on Windows for nonexistant files + # abs_path throws on Windows for nonexistent files and (try { Cwd::abs_path($fullpath) }) ne ((try { Cwd::abs_path(File::Spec->catfile($self->dump_directory, $file)) }) || ''); } @@ -1605,8 +1605,8 @@ sub _load_tables { my $moniker_parts = [ @{ $self->moniker_parts } ]; - my $have_schema = 1 if any { $_ eq 'schema' } @{ $self->moniker_parts }; - my $have_database = 1 if any { $_ eq 'database' } @{ $self->moniker_parts }; + my $have_schema = any { $_ eq 'schema' } @{ $self->moniker_parts }; + my $have_database = any { $_ eq 'database' } @{ $self->moniker_parts }; unshift @$moniker_parts, 'schema' if $use_schema && !$have_schema; unshift @$moniker_parts, 'database' if $use_database && !$have_database;