projects
/
dbsrgits/SQL-Abstract.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Add error checking on "profile" for SQLA::Tree
[dbsrgits/SQL-Abstract.git]
/
lib
/
SQL
/
Abstract
/
Tree.pm
diff --git
a/lib/SQL/Abstract/Tree.pm
b/lib/SQL/Abstract/Tree.pm
index
5bfcc67
..
f6076ba
100644
(file)
--- a/
lib/SQL/Abstract/Tree.pm
+++ b/
lib/SQL/Abstract/Tree.pm
@@
-284,6
+284,9
@@
sub new {
my $args = shift || {};
my $profile = delete $args->{profile} || 'none';
+
+ die "No such profile '$profile'!" unless exists $profiles{$profile};
+
my $data = $merger->merge( $profiles{$profile}, $args );
bless $data, $class