trigger => sub { shift->clear_renderer_class }
);
+sub BUILD {
+ if ($_[0]->can('emulate_limit')) {
+ die <<EODIE;
+The ancient and horrible emulate_limit method was deprecated for many moons.
+Now, it is no more. Time to rewrite the code in ${\ref($_[0])}
+EODIE
+ }
+}
+
our %LIMIT_DIALECT_MAP = (
'GenericSubQ' => 'GenericSubquery',
);
use warnings;
use Test::More;
-use Test::Warn;
use lib qw(t/lib);
use DBICTest;
my $rs = $s->resultset ('CD');
-warnings_exist { is_same_sql_bind (
- $rs->search ({}, { rows => 1, offset => 3,columns => [
- { id => 'foo.id' },
- { 'artist.id' => 'bar.id' },
- { bleh => \ 'TO_CHAR (foo.womble, "blah")' },
- ]})->as_query,
- '(
- shiny sproc (
- (
- SELECT foo.id, bar.id, TO_CHAR (foo.womble, "blah")
- FROM cd me
- ),
- 1,
- 3
- )
- )',
- [],
- 'Rownum subsel aliasing works correctly'
- )}
- qr/\Qthe legacy emulate_limit() mechanism inherited from SQL::Abstract::Limit has been deprecated/,
- 'deprecation warning'
-;
+ok(!eval { $rs->all }, 'Legacy emulate_limit method dies');
done_testing;