[Jifty-commit] r1238 - Jifty-DBI/trunk/lib/Jifty/DBI
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Jun 9 22:40:50 EDT 2006
Author: seanmil
Date: Fri Jun 9 22:40:49 2006
New Revision: 1238
Modified:
Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
Log:
* Restore support for old API method of new($handle)
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm Fri Jun 9 22:40:49 2006
@@ -34,10 +34,16 @@
=head1 METHODS
-=head2 new
+=head2 new ARGS
Instantiate a new, empty record object.
+ARGS is a hash used to pass parameters to the _init() function.
+
+Unless it is overloaded, the _init() function expects one key of
+'handle' with a value containing a reference to a Jifty::DBI::Handle
+object.
+
=cut
sub new {
@@ -50,7 +56,12 @@
$self->_init_columns() unless $self->COLUMNS;
$self->input_filters('Jifty::DBI::Filter::Truncate');
- $self->_init(@_);
+ if ( scalar(@_) == 1 ) {
+ Carp::cluck("new(\$handle) is deprecated, use new( handle => \$handle )");
+ $self->_init( handle => shift );
+ } else {
+ $self->_init(@_);
+ }
return $self;
}
More information about the Jifty-commit
mailing list