pairs of column name/info at once
- $rs->search now throws when called in void context, as it makes
no sense (and is nearly always a sign of a bug/misdesign)
- - Deprecate legacy $rs->search( %condition ) syntax
+ - Deprecate legacy $rs->search( %condition ) syntax (warn once per
+ callsite)
- NULL is now supplied unquoted to all debug-objects, in order to
differentiate between a real NULL and the string 'NULL'
- New search() condition operator -value used to pass complex bind
=cut
+my $callsites_warned;
sub search_rs {
my $self = shift;
} if @_;
- carp 'search( %condition ) is deprecated, use search( \%condition ) instead'
- if (@_ > 1 and ! $self->result_source->result_class->isa('DBIx::Class::CDBICompat') );
+ if( @_ > 1 and ! $self->result_source->result_class->isa('DBIx::Class::CDBICompat') ) {
+ # determine callsite obeying Carp::Clan rules (fucking ugly but don't have better ideas)
+ my $callsite = do {
+ my $w;
+ local $SIG{__WARN__} = sub { $w = shift };
+ carp;
+ $w
+ };
+ carp 'search( %condition ) is deprecated, use search( \%condition ) instead'
+ unless $callsites_warned->{$callsite}++;
+ }
for ($old_where, $call_cond) {
if (defined $_) {