[Bast-commits] r5815 - in DBIx-Class/0.08/trunk: . lib/DBIx/Class
robkinyon at dev.catalyst.perl.org
robkinyon at dev.catalyst.perl.org
Thu Mar 26 01:09:55 GMT 2009
Author: robkinyon
Date: 2009-03-26 01:09:55 +0000 (Thu, 26 Mar 2009)
New Revision: 5815
Modified:
DBIx-Class/0.08/trunk/Changes
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
Log:
Deprecated search_like()
Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes 2009-03-24 22:10:16 UTC (rev 5814)
+++ DBIx-Class/0.08/trunk/Changes 2009-03-26 01:09:55 UTC (rev 5815)
@@ -27,6 +27,7 @@
it is called. (eg ->new({ name => 'foo'})->bar if bar uses bar_id)
- Currently skipped. Changed exception to have a more detailed message
- Document the known issue and a possible work around.
+ - search_like() now warns to indicate deprecation in 0.09. (robkinyon)
0.08099_06 2009-01-23 07:30:00 (UTC)
- Allow a scalarref to be supplied to the 'from' resultset attribute
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-03-24 22:10:16 UTC (rev 5814)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-03-26 01:09:55 UTC (rev 5815)
@@ -860,10 +860,20 @@
For more information, see L<DBIx::Class::Manual::Cookbook>.
+This method is deprecated and will be removed in 0.09. Use L</search()>
+instead. An example conversion is:
+
+ ->search_like({ foo => 'bar' });
+
+ # Becomes
+
+ ->search({ foo => { like => 'bar' } });
+
=cut
sub search_like {
my $class = shift;
+ carp "search_like() is deprecated and will be removed in 0.09. Use search() instead.";
my $attrs = (@_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {});
my $query = ref $_[0] eq 'HASH' ? { %{shift()} }: {@_};
$query->{$_} = { 'like' => $query->{$_} } for keys %$query;
More information about the Bast-commits
mailing list