From: Dagfinn Ilmari Mannsåker Date: Wed, 19 Sep 2012 09:43:32 +0000 (+0100) Subject: Make read-only SQLT::Schema::Table attributes carp instead of die X-Git-Tag: v0.11013_01~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=02240029384c877856180b2be66a7ba6778e9525;p=dbsrgits%2FSQL-Translator.git Make read-only SQLT::Schema::Table attributes carp instead of die --- diff --git a/lib/SQL/Translator/Schema/Table.pm b/lib/SQL/Translator/Schema/Table.pm index eaae5d0..2f36e9b 100644 --- a/lib/SQL/Translator/Schema/Table.pm +++ b/lib/SQL/Translator/Schema/Table.pm @@ -20,7 +20,7 @@ C is the table object. =cut use Moo 1.000003; -use SQL::Translator::Utils qw(parse_list_arg ex2err throw); +use SQL::Translator::Utils qw(parse_list_arg ex2err throw carp_ro); use SQL::Translator::Types qw(schema_obj); use SQL::Translator::Role::ListAttr; use SQL::Translator::Schema::Constants; @@ -549,6 +549,8 @@ True if table has no data (non-key) fields and only uses single key joins. has is_trivial_link => ( is => 'lazy', init_arg => undef ); +around is_trivial_link => carp_ro('is_trivial_link'); + sub _build_is_trivial_link { my $self = shift; return 0 if $self->is_data; @@ -577,6 +579,8 @@ Returns true if the table has some non-key fields. has is_data => ( is => 'lazy', init_arg => undef ); +around is_data => carp_ro('is_data'); + sub _build_is_data { my $self = shift;