Subject: | New "please put it directly into the columns definition" warnings could be more helpful [PATCH] |
New "please put it directly into the columns definition" warnings could be more helpful by
including the specific column name.
I've attached patch that does that. Adding the table name would also be handy, but this was
enough for me.
Subject: | InflateColumn-DateTime-columnname.patch |
Index: /home/tim/trunk/perl/cpan/lib/perl5/DBIx/Class/InflateColumn/DateTime.pm
===================================================================
--- /home/tim/trunk/perl/cpan/lib/perl5/DBIx/Class/InflateColumn/DateTime.pm (revision 5224)
+++ /home/tim/trunk/perl/cpan/lib/perl5/DBIx/Class/InflateColumn/DateTime.pm (working copy)
@@ -112,14 +112,14 @@
my $timezone;
if ( defined $info->{extra}{timezone} ) {
warn "Putting timezone into extra => { timezone => '...' } has been deprecated, ".
- "please put it directly into the columns definition.";
+ "please put it directly into the '$column' column definition";
$timezone = $info->{extra}{timezone};
}
my $locale;
if ( defined $info->{extra}{locale} ) {
warn "Putting locale into extra => { locale => '...' } has been deprecated, ".
- "please put it directly into the columns definition.";
+ "please put it directly into the '$column' column definition";
$locale = $info->{extra}{locale};
}
@@ -147,7 +147,7 @@
my $floating_tz_ok;
if (defined $info->{extra}{floating_tz_ok}) {
warn "Putting floating_tz_ok into extra => { floating_tz_ok => 1 } has been deprecated, ".
- "please put it directly into the columns definition.";
+ "please put it directly into the '$column' column definition";
$floating_tz_ok = $info->{extra}{floating_tz_ok};
}
$floating_tz_ok = $info->{floating_tz_ok} if defined $info->{floating_tz_ok};