[Bast-commits] r4651 -
DBIx-Class-Tree-NestedSet/lib/DBIx/Class/Tree/NestedSet
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Sat Jul 26 00:20:05 BST 2008
Author: rafl
Date: 2008-07-26 00:20:05 +0100 (Sat, 26 Jul 2008)
New Revision: 4651
Modified:
DBIx-Class-Tree-NestedSet/lib/DBIx/Class/Tree/NestedSet/Multi.pm
Log:
Croak if not all required colums are specified.
Modified: DBIx-Class-Tree-NestedSet/lib/DBIx/Class/Tree/NestedSet/Multi.pm
===================================================================
--- DBIx-Class-Tree-NestedSet/lib/DBIx/Class/Tree/NestedSet/Multi.pm 2008-07-25 23:19:58 UTC (rev 4650)
+++ DBIx-Class-Tree-NestedSet/lib/DBIx/Class/Tree/NestedSet/Multi.pm 2008-07-25 23:20:05 UTC (rev 4651)
@@ -3,6 +3,7 @@
package DBIx::Class::Tree::NestedSet::Multi;
+use Carp qw/croak/;
use parent 'DBIx::Class';
our $VERSION = '0.01_01';
@@ -24,7 +25,12 @@
};
my ($root, $left, $right) = map {
- $args->{"${_}_column"}
+ my $col = $args->{"${_}_column"};
+
+ croak("required param $_ not specified")
+ if !defined $col;
+
+ $col;
} qw/root left right/;
my $table = $class->table;
More information about the Bast-commits
mailing list