X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FHelper%2FModel%2FDBIC%2FSchema.pm;h=8cdea7ec74a36a0add9be0a33522d2c9c54df05a;hb=0fbbc8d5e4350567138902f16f217fe90439e55d;hp=1ca41358b3048405bd8cf67415a6cc5f04215bbd;hpb=2201c2e4eadb70fe4567d1a288604c62a473a6e4;p=catagits%2FCatalyst-Model-DBIC-Schema.git diff --git a/lib/Catalyst/Helper/Model/DBIC/Schema.pm b/lib/Catalyst/Helper/Model/DBIC/Schema.pm index 1ca4135..8cdea7e 100644 --- a/lib/Catalyst/Helper/Model/DBIC/Schema.pm +++ b/lib/Catalyst/Helper/Model/DBIC/Schema.pm @@ -103,6 +103,9 @@ Use of either of the C options requires L. =head2 mk_compclass +This is called by L with the commandline args to generate the +files. + =cut sub mk_compclass { @@ -157,7 +160,7 @@ sub _parse_loader_args { next if $key =~ /^(?:components|constraint|exclude)\z/; $loader_args{$key} = eval $val; - die "syntax error for loader args key '$key' with value '$val': $@" + croak "syntax error for loader args key '$key' with value '$val': $@" if $@; } @@ -254,7 +257,7 @@ sub _build_helper_connect_info { for (@connect_info) { if (/^\s*{.*}\s*\z/) { my $hash = eval $_; - die "Syntax errorr in connect_info hash: $_: $@" if $@; + croak "Syntax errorr in connect_info hash: $_: $@" if $@; my %hash = %$hash; for my $key (keys %hash) { @@ -304,7 +307,7 @@ sub _parse_connect_info { for (@connect_info) { if (/^\s*{.*}\s*\z/) { my $hash = eval $_; - die "Syntax errorr in connect_info hash: $_: $@" if $@; + croak "Syntax errorr in connect_info hash: $_: $@" if $@; %connect_info = (%connect_info, %$hash); @@ -314,7 +317,7 @@ sub _parse_connect_info { my ($key, $val) = split /=/, $_, 2; $connect_info{$key} = eval $val; - die "syntax error for connect_info key '$key' with value '$val': $@" + croak "syntax error for connect_info key '$key' with value '$val': $@" if $@; } @@ -353,7 +356,7 @@ sub _gen_dynamic_schema { sub _gen_static_schema { my $self = shift; - die "cannot load schema without connect info" unless $self->connect_info; + croak "cannot load schema without connect info" unless $self->connect_info; my $helper = $self->helper;