X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema.pm;h=0b9b969f7755704e91fe4304e6279bf85baa7c57;hb=75d079145a507a0e5ff89b2676d383f4fd1a5511;hp=e0cb8cc4cfaa452d84a03d361a211418fe57ac3d;hpb=884559b13fe244d3e446d127e9fd21ea8d7c6eb3;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index e0cb8cc..0b9b969 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -99,7 +99,7 @@ sub register_source { $map{$source->result_class} = $moniker; $self->class_mappings(\%map); } -} +} =head2 class @@ -207,7 +207,7 @@ need to add C before your load_classes call. Example: My::Schema->load_classes(); # loads My::Schema::CD, My::Schema::Artist, - # etc. (anything under the My::Schema namespace) + # etc. (anything under the My::Schema namespace) # loads My::Schema::CD, My::Schema::Artist, Other::Namespace::Producer but # not Other::Namespace::LinerNotes nor My::Schema::Track @@ -263,9 +263,9 @@ sub load_classes { my $comp_class = "${prefix}::${comp}"; eval "use $comp_class"; # If it fails, assume the user fixed it if ($@) { - $comp_class =~ s/::/\//g; + $comp_class =~ s/::/\//g; die $@ unless $@ =~ /Can't locate.+$comp_class\.pm\sin\s\@INC/; - warn $@ if $@; + warn $@ if $@; } push(@to_register, [ $comp, $comp_class ]); } @@ -569,8 +569,8 @@ sub txn_do { $self->txn_begin; # If this throws an exception, no rollback is needed my $wantarray = wantarray; # Need to save this since the context - # inside the eval{} block is independent - # of the context that called txn_do() + # inside the eval{} block is independent + # of the context that called txn_do() eval { # Need to differentiate between scalar/list context to allow for @@ -599,7 +599,7 @@ sub txn_do { my $rollback_error = $@; my $exception_class = "DBIx::Class::Storage::NESTED_ROLLBACK_EXCEPTION"; $self->throw_exception($error) # propagate nested rollback - if $rollback_error =~ /$exception_class/; + if $rollback_error =~ /$exception_class/; $self->throw_exception( "Transaction aborted: $error. Rollback failed: ${rollback_error}" @@ -674,7 +674,7 @@ sub populate { =head2 throw_exception -=over 4 +=over 4 =item Arguments: $message