[Bast-commits] r9725 - SQL-Abstract/1.x/trunk/lib/SQL/Abstract
frew at dev.catalyst.perl.org
frew at dev.catalyst.perl.org
Sun Sep 12 19:39:58 GMT 2010
Author: frew
Date: 2010-09-12 20:39:58 +0100 (Sun, 12 Sep 2010)
New Revision: 9725
Modified:
SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Tree.pm
Log:
use object interface to Hash::Merge
Modified: SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Tree.pm
===================================================================
--- SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Tree.pm 2010-09-12 19:38:38 UTC (rev 9724)
+++ SQL-Abstract/1.x/trunk/lib/SQL/Abstract/Tree.pm 2010-09-12 19:39:58 UTC (rev 9725)
@@ -5,9 +5,11 @@
use Carp;
use List::Util;
-use Hash::Merge 'merge';
+use Hash::Merge;
-Hash::Merge::specify_behavior({
+my $merger = Hash::Merge->new;
+
+$merger->specify_behavior({
SCALAR => {
SCALAR => sub { $_[1] },
ARRAY => sub { [ $_[0], @{$_[1]} ] },
@@ -193,7 +195,7 @@
my $args = shift || {};
my $profile = delete $args->{profile} || 'none';
- my $data = merge( $profiles{$profile}, $args );
+ my $data = $merger->merge( $profiles{$profile}, $args );
bless $data, $class
}
More information about the Bast-commits
mailing list