From: Peter Rabbitson Date: Thu, 23 Jun 2011 09:04:58 +0000 (+0200) Subject: SQLMaker is a proper C3-enabled class, do not use SUPER:: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=70551c3d5c3f7cc980306200e8712fda39a5a4e6;p=dbsrgits%2FDBIx-Class-Historic.git SQLMaker is a proper C3-enabled class, do not use SUPER:: --- diff --git a/lib/DBIx/Class/SQLMaker/MySQL.pm b/lib/DBIx/Class/SQLMaker/MySQL.pm index fdb2d6b..c96b11c 100644 --- a/lib/DBIx/Class/SQLMaker/MySQL.pm +++ b/lib/DBIx/Class/SQLMaker/MySQL.pm @@ -10,14 +10,12 @@ use base qw( DBIx::Class::SQLMaker ); sub insert { my $self = shift; - my $table = $_[0]; - $table = $self->_quote($table); - if (! $_[1] or (ref $_[1] eq 'HASH' and !keys %{$_[1]} ) ) { + my $table = $self->_quote($_[0]); return "INSERT INTO ${table} () VALUES ()" } - return $self->SUPER::insert (@_); + return $self->next::method (@_); } # Allow STRAIGHT_JOIN's @@ -28,7 +26,7 @@ sub _generate_join_clause { return ' STRAIGHT_JOIN ' } - return $self->SUPER::_generate_join_clause( $join_type ); + return $self->next::method($join_type); } # LOCK IN SHARE MODE diff --git a/lib/DBIx/Class/SQLMaker/Oracle.pm b/lib/DBIx/Class/SQLMaker/Oracle.pm index f526e99..d088192 100644 --- a/lib/DBIx/Class/SQLMaker/Oracle.pm +++ b/lib/DBIx/Class/SQLMaker/Oracle.pm @@ -20,7 +20,7 @@ sub new { handler => '_where_field_PRIOR', }; - $self->SUPER::new (\%opts); + $self->next::method(\%opts); } sub _assemble_binds { @@ -36,7 +36,7 @@ sub _parse_rs_attrs { my ($cb_sql, @cb_bind) = $self->_connect_by($rs_attrs); push @{$self->{oracle_connect_by_bind}}, @cb_bind; - my $sql = $self->SUPER::_parse_rs_attrs(@_); + my $sql = $self->next::method(@_); return "$cb_sql $sql"; }