From: Peter Rabbitson Date: Sat, 11 Sep 2010 01:04:07 +0000 (+0200) Subject: Fix stupid attempt to set a r/o accessor X-Git-Tag: 0.07002~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=53e721bce0ce6df2b721c52ec331a8098e55b533;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Fix stupid attempt to set a r/o accessor Bump CAG dependency to properly croak in the future --- diff --git a/Makefile.PL b/Makefile.PL index 0328238..fc33ac0 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -40,7 +40,7 @@ requires 'Data::Dump' => '1.06'; requires 'Lingua::EN::Inflect::Number' => '1.1'; requires 'Lingua::EN::Inflect::Phrase' => '0.02'; requires 'Digest::MD5' => '2.36'; -requires 'Class::Accessor::Grouped' => '0.09002'; +requires 'Class::Accessor::Grouped' => '0.09006'; requires 'MRO::Compat' => '0.09'; requires 'Class::C3::Componentised' => '1.0005'; requires 'Carp::Clan' => 0; diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index 7a9d307..01f925f 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -551,8 +551,7 @@ sub new { if ($self->use_moose) { if (not DBIx::Class::Schema::Loader::Optional::Dependencies->req_ok_for('use_moose')) { - die sprintf "You must install the following CPAN modules to enable the use_moose option: %s.\nYou are missing: %s.\n", - "Moose, MooseX::NonMoose and namespace::autoclean", + die sprintf "You must install the following CPAN modules to enable the use_moose option: %s.\n", DBIx::Class::Schema::Loader::Optional::Dependencies->req_missing_for('use_moose'); } } @@ -662,7 +661,7 @@ EOF # determine if the existing schema was dumped with use_moose => 1 if (! defined $self->use_moose) { - $self->use_moose(1) if $old_gen =~ /^ (?!\s*\#) use \s+ Moose/xm; + $self->{use_moose} = 1 if $old_gen =~ /^ (?!\s*\#) use \s+ Moose/xm; } my $load_classes = ($old_gen =~ /^__PACKAGE__->load_classes;/m) ? 1 : 0;