X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FRelBuilder.pm;h=413c959a21c464d7ccb1a4cae71e90562e26dc35;hb=refs%2Fheads%2Fnamespace-cleanup;hp=e66ce733ccead8cb1b2f793009966038e0c18f7b;hpb=6bef66965f54b025022273482bc134fdc58790b2;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm index e66ce73..413c959 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm @@ -9,15 +9,15 @@ use Scalar::Util 'weaken'; use DBIx::Class::Schema::Loader::Utils qw/split_name slurp_file array_eq apply uniq/; use Try::Tiny; use List::Util qw/all any first/; -use namespace::clean; -use Lingua::EN::Inflect::Phrase (); -use Lingua::EN::Tagger (); +use Lingua::EN::Inflect::Phrase qw(to_PL to_S); +use Lingua::EN::Tagger; use String::ToIdentifier::EN (); use String::ToIdentifier::EN::Unicode (); -use Class::Unload (); -use Class::Inspector (); +use Class::Unload; +use Class::Inspector; +use namespace::clean; -our $VERSION = '0.07043'; +our $VERSION = '0.07047'; # Glossary: # @@ -94,16 +94,18 @@ This method will return the generated relationships as a hashref keyed on the class names. The values are arrayrefs of hashes containing method name and arguments, like so: - { - 'Some::Source::Class' => [ - { method => 'belongs_to', arguments => [ 'col1', 'Another::Source::Class' ], - { method => 'has_many', arguments => [ 'anothers', 'Yet::Another::Source::Class', 'col15' ], - ], - 'Another::Source::Class' => [ - # ... - ], - # ... - } + { + 'Some::Source::Class' => [ + { method => 'belongs_to', arguments => [ + 'col1', 'Another::Source::Class' ] }, + { method => 'has_many', arguments => [ + 'anothers', 'Yet::Another::Source::Class', 'col15' ] }, + ], + 'Another::Source::Class' => [ + # ... + ], + # ... + } =cut @@ -216,7 +218,7 @@ sub _to_PL { my ($self, $name) = @_; $name =~ s/_/ /g; - my $plural = Lingua::EN::Inflect::Phrase::to_PL($name); + my $plural = to_PL($name); $plural =~ s/ /_/g; return $plural; @@ -226,7 +228,7 @@ sub _to_S { my ($self, $name) = @_; $name =~ s/_/ /g; - my $singular = Lingua::EN::Inflect::Phrase::to_S($name); + my $singular = to_S($name); $singular =~ s/ /_/g; return $singular; @@ -967,9 +969,9 @@ sub _cleanup { $self->_temp_classes([]); } -=head1 AUTHOR +=head1 AUTHORS -See L and L. +See L. =head1 LICENSE