[Bast-commits] r6234 - in DBIx-Class/0.08/trunk/lib/DBIx/Class: .
SQLAHacks Storage
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue May 12 16:09:14 GMT 2009
Author: ribasushi
Date: 2009-05-12 16:09:14 +0000 (Tue, 12 May 2009)
New Revision: 6234
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks/OracleJoins.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/TxnScopeGuard.pm
Log:
Some more die/croak conversions
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks/OracleJoins.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks/OracleJoins.pm 2009-05-12 15:33:56 UTC (rev 6233)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks/OracleJoins.pm 2009-05-12 16:09:14 UTC (rev 6234)
@@ -2,6 +2,7 @@
DBIx::Class::SQLAHacks::OracleJoins;
use base qw( DBIx::Class::SQLAHacks );
+use Carp::Clan qw/^DBIx::Class/;
sub select {
my ($self, $table, $fields, $where, $order, @rest) = @_;
@@ -67,7 +68,7 @@
#TODO: Support full outer joins -- this would happen much earlier in
#the sequence since oracle 8's full outer join syntax is best
#described as INSANE.
- die "Can't handle full outer joins in Oracle 8 yet!\n"
+ croak "Can't handle full outer joins in Oracle 8 yet!\n"
if $to_jt->{-join_type} =~ /full/i;
$left_join = q{(+)} if $to_jt->{-join_type} =~ /left/i
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks.pm 2009-05-12 15:33:56 UTC (rev 6233)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/SQLAHacks.pm 2009-05-12 16:09:14 UTC (rev 6234)
@@ -124,7 +124,7 @@
local $self->{rownum_hack_count} = 1
if (defined $rest[0] && $self->{limit_dialect} eq 'RowNum');
@rest = (-1) unless defined $rest[0];
- die "LIMIT 0 Does Not Compute" if $rest[0] == 0;
+ croak "LIMIT 0 Does Not Compute" if $rest[0] == 0;
# and anyway, SQL::Abstract::Limit will cause a barf if we don't first
my ($sql, @where_bind) = $self->SUPER::select(
$table, $self->_recurse_fields($fields), $where, $order, @rest
@@ -189,7 +189,7 @@
if ($func eq 'distinct') {
my $_fields = $fields->{$func};
if (ref $_fields eq 'ARRAY' && @{$_fields} > 1) {
- die "Unsupported syntax, please use " .
+ croak "Unsupported syntax, please use " .
"{ group_by => [ qw/" . (join ' ', @$_fields) . "/ ] }" .
" or " .
"{ select => [ qw/" . (join ' ', @$_fields) . "/ ], distinct => 1 }";
@@ -212,7 +212,7 @@
return $self->_fold_sqlbind( $fields );
}
else {
- Carp::croak($ref . qq{ unexpected in _recurse_fields()})
+ croak($ref . qq{ unexpected in _recurse_fields()})
}
}
@@ -332,8 +332,7 @@
for (keys %$cond) {
my $v = $cond->{$_};
if (ref $v) {
- # XXX no throw_exception() in this package and croak() fails with strange results
- Carp::croak(ref($v) . qq{ reference arguments are not supported in JOINS - try using \"..." instead'})
+ croak (ref($v) . qq{ reference arguments are not supported in JOINS - try using \"..." instead'})
if ref($v) ne 'SCALAR';
$j{$_} = $v;
}
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/TxnScopeGuard.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/TxnScopeGuard.pm 2009-05-12 15:33:56 UTC (rev 6233)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/TxnScopeGuard.pm 2009-05-12 16:09:14 UTC (rev 6234)
@@ -2,6 +2,7 @@
use strict;
use warnings;
+use Carp ();
sub new {
my ($class, $storage) = @_;
More information about the Bast-commits
mailing list