Skip to content

Commit 2c005d9

Browse files
committed
-extends => 'SQL::Abstract' is deprecated
1 parent 70662b5 commit 2c005d9

4 files changed

Lines changed: 20 additions & 1 deletion

File tree

‎Changes‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Revision history for SQL-Abstract-More
22

33

4+
- -extends => 'SQL::Abstract' is deprecated
5+
46
1.44 13.07.2025
57
- accept table aliases in update() and delete() (djerius++)
68

‎lib/SQL/Abstract/More.pm‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ sub import {
4444
return;
4545
}
4646

47+
# inheriting from other parents is deprecated
48+
$parent_sqla eq 'SQL::Abstract::Classic'
49+
or warn "inheriting from $parent_sqla is deprecated and will no longer be supported in future versions";
50+
4751
# load the parent, inherit from it, import puke() and belch()
4852
eval qq{use parent '$parent_sqla';
4953
*puke = \\&${parent_sqla}::puke;

‎t/01-sql_abstract_more.t‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,19 @@ is_same_sql_bind(
723723
);
724724

725725

726+
# -in with empty array -- only works with SQLA::Classic
727+
if ($sqla->isa('SQL::Abstract::Classic')) {
728+
($sql, @bind) = $sqla->where({foo => {-in => []}});
729+
is_same_sql_bind(
730+
$sql, \@bind,
731+
' WHERE 0=1',
732+
[],
733+
"-in with empty array",
734+
);
735+
}
736+
737+
738+
726739
#----------------------------------------------------------------------
727740
# -in with objects
728741
#----------------------------------------------------------------------

‎t/08-no-import.t‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require SQL::Abstract::More; # no "use" ... so no import()
77

88
my $sqla = SQL::Abstract::More->new; # import() called implicitly through new()
99

10-
ok $sqla->isa('SQL::Abstract::Classic'), '@ISA was populated';
10+
ok $sqla->isa('SQL::Abstract::Classic') || $sqla->isa('SQL::Abstract'), '@ISA was populated';
1111

1212
my ($sql, @bind) = $sqla->select(
1313
-columns => [qw/bar/],

0 commit comments

Comments
 (0)