Attempt to fix 'Attempt to free unreferenced scalar' on 5.8
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / RelBuilder.pm
index e66ce73..413c959 100644 (file)
@@ -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<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
+See L<DBIx::Class::Schema::Loader/AUTHORS>.
 
 =head1 LICENSE