From: moltar Date: Mon, 26 Mar 2012 00:37:29 +0000 (-0400) Subject: Fixed incorrect reading of caller(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9771f74b1717dbd837e90fa65d36c9746d6e9cc1;p=dbsrgits%2FDBIx-Class.git Fixed incorrect reading of caller(). --- diff --git a/lib/DBIx/Class/InflateColumn/DateTime.pm b/lib/DBIx/Class/InflateColumn/DateTime.pm index ad80785..b2d3072 100644 --- a/lib/DBIx/Class/InflateColumn/DateTime.pm +++ b/lib/DBIx/Class/InflateColumn/DateTime.pm @@ -224,7 +224,7 @@ sub _datetime_parser { sub _post_inflate_datetime { my( $self, $dt, $info ) = @_; - if ((caller(0))[3] ne 'post_inflate_datetime') { + if ((split(/::/, (caller(1))[3]))[-1] ne 'post_inflate_datetime') { carp "Method _post_inflate_datetime is deprecated and should not be used." . " Please use post_inflate_datetime method instead."; } @@ -243,7 +243,7 @@ sub post_inflate_datetime { sub _pre_deflate_datetime { my( $self, $dt, $info ) = @_; - if ((caller(0))[3] ne 'pre_deflate_datetime') { + if ((split(/::/, (caller(1))[3]))[-1] ne 'pre_deflate_datetime') { carp "Method _pre_deflate_datetime is deprecated and should not be used." . " Please use pre_deflate_datetime method instead."; }