From: Brandon Black Date: Thu, 12 Oct 2006 16:07:43 +0000 (+0000) Subject: removed legacy_default_inflections. Apparently it has never worked right anyways... X-Git-Tag: 0.03999_01~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3af7a07b420118d58958aed6d5343db6219095c;p=dbsrgits%2FDBIx-Class-Schema-Loader.git removed legacy_default_inflections. Apparently it has never worked right anyways and nobody ever complained, so deprecating it earlier than expected --- diff --git a/Build.PL b/Build.PL index 99f7420..0f43383 100644 --- a/Build.PL +++ b/Build.PL @@ -9,7 +9,6 @@ my %arguments = ( 'Scalar::Util' => 0, 'Data::Dump' => 1.06, 'UNIVERSAL::require' => 0.10, - 'Lingua::EN::Inflect' => 1.89, 'Lingua::EN::Inflect::Number' => 1.1, 'Text::Balanced' => 0, 'Class::Accessor' => 0.27, diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index be0600f..a9593f0 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -33,8 +33,6 @@ __PACKAGE__->mk_ro_accessors(qw/ dump_directory dump_overwrite - legacy_default_inflections - db_schema _tables classes @@ -140,19 +138,6 @@ classes. A good example would be C. Component C will be automatically added to the above C list if this option is set. -=head2 legacy_default_inflections - -Setting this option changes the default fallback for L to -utilize L, and L to a no-op. -Those choices produce substandard results, but might be necessary to support -your existing code if you started developing on a version prior to 0.03 and -don't wish to go around updating all your relationship names to the new -defaults. - -This option will continue to be supported until at least version 0.05xxx, -but may dissappear sometime thereafter. It is recommended that you update -your code to use the newer-style inflections when you have the time. - =head2 dump_directory This option is designed to be a tool to help you transition from this diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm index e72da38..84d74f6 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm @@ -3,7 +3,6 @@ package DBIx::Class::Schema::Loader::RelBuilder; use strict; use warnings; use Carp::Clan qw/^DBIx::Class/; -use Lingua::EN::Inflect (); use Lingua::EN::Inflect::Number (); our $VERSION = '0.03999_01'; @@ -104,9 +103,7 @@ sub _inflect_plural { return $inflected if $inflected; } - return $self->{legacy_default_inflections} - ? Lingua::EN::Inflect::PL($relname) - : Lingua::EN::Inflect::Number::to_PL($relname); + return Lingua::EN::Inflect::Number::to_PL($relname); } # Singularize a relationship name @@ -122,9 +119,7 @@ sub _inflect_singular { return $inflected if $inflected; } - return $self->{legacy_default_inflections} - ? $relname - : Lingua::EN::Inflect::Number::to_S($relname); + return Lingua::EN::Inflect::Number::to_S($relname); } sub generate_code {