$map{$source->result_class} = $moniker;
$self->class_mappings(\%map);
}
-}
+}
=head2 class
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
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 ]);
}
$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
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}"
=head2 throw_exception
-=over 4
+=over 4
=item Arguments: $message