From: Matt S Trout Date: Sat, 23 Jan 2021 07:22:39 +0000 (+0000) Subject: that wasn't nearly enough usage to add the dependency X-Git-Tag: v2.000001~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=addf04c4ab87439b44934c6ae54c2118e1d865f8;p=dbsrgits%2FSQL-Abstract.git that wasn't nearly enough usage to add the dependency --- diff --git a/Changes b/Changes index 51b853f..65d1688 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for SQL::Abstract + - Remove Module::Runtime requirement + 2.000000 - 2021-01-21 - Collapse custom join conditions back to something DBIC might understand diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 23f1952..5e13461 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -2,7 +2,6 @@ package SQL::Abstract; # see doc at end of file use strict; use warnings; -use Module::Runtime (); use Carp (); use List::Util (); use Scalar::Util (); @@ -352,8 +351,8 @@ sub new { } if ($opt{lazy_join_sql_parts}) { - my $mod = Module::Runtime::use_module('SQL::Abstract::Parts'); - $opt{join_sql_parts} ||= sub { $mod->new(@_) }; + require SQL::Abstract::Parts; + $opt{join_sql_parts} ||= sub { SQL::Abstract::Parts->new(@_) }; } $opt{join_sql_parts} ||= sub { join $_[0], @_[1..$#_] }; diff --git a/lib/SQL/Abstract/Parts.pm b/lib/SQL/Abstract/Parts.pm index e4a2033..64fc71d 100644 --- a/lib/SQL/Abstract/Parts.pm +++ b/lib/SQL/Abstract/Parts.pm @@ -24,8 +24,8 @@ sub to_array { return @{$_[0]} } sub formatter { my ($self, %opts) = @_; - Module::Runtime::use_module('SQL::Abstract::Formatter') - ->new(%opts) + require SQL::Abstract::Formatter; + SQL::Abstract::Formatter->new(%opts) } sub format {