diff --git a/Changes b/Changes index bcfa503..b79e3ed 100644 --- a/Changes +++ b/Changes @@ -2,3 +2,6 @@ Revision history for SQL::Abstract::Complete 1.01 Sat Feb 23 16:25:56 PST 2013 First version, released on an unsuspecting world. + +1.03 Mon Jun 10 16:49:35 PDT 2013 + Switch from Clone::Fast to Storable dclone for deep copy diff --git a/Makefile.PL b/Makefile.PL index 904bc4d..cc6ea66 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -14,7 +14,7 @@ WriteMakefile( PREREQ_PM => { 'Test::More' => 0, 'SQL::Abstract' => 1.5, - 'Clone::Fast' => 0, + 'Storable' => 0, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'SQL-Abstract-Complete-*' }, diff --git a/lib/SQL/Abstract/Complete.pm b/lib/SQL/Abstract/Complete.pm index 3b07155..0219720 100644 --- a/lib/SQL/Abstract/Complete.pm +++ b/lib/SQL/Abstract/Complete.pm @@ -2,11 +2,11 @@ package SQL::Abstract::Complete; use strict; use warnings; use SQL::Abstract 1.5; -use Clone::Fast 'clone'; +use Storable 'dclone'; use vars '@ISA'; @ISA = 'SQL::Abstract'; -our $VERSION = '1.01'; +our $VERSION = '1.03'; sub new { my $self = shift; @@ -31,7 +31,7 @@ sub _sqlcase { sub select { my ( $self, $tables, $columns, $where, $meta ) = @_; $columns = ['*'] unless ( $columns and @{$columns} > 0 ); - $tables = clone($tables); + $tables = dclone($tables) if ( ref $tables ); my $columns_sql = $self->_sqlcase('select') . ' ' . _wipe_space( ( ref($columns) eq 'SCALAR' ) ? ${$columns} : @@ -46,7 +46,10 @@ sub select { my $core_table; my $tables_sql = join( $self->{'part_join'}, - map { _wipe_space( join( ' ', $self->_sqlcase( shift( @{$_} ) ), @{$_} ) ) } ( + map { _wipe_space( join( ' ', + $self->_sqlcase( shift( @{$_} ) ), + grep { defined } @{$_} ) + ) } ( ( ref($tables) eq 'SCALAR' ) ? [ undef, ${$tables} ] : ( not ref($tables) ) ? [ 'from', $self->_quote($tables) ] : map { @@ -324,7 +327,9 @@ L, L, L. =head1 AUTHOR -Gryphon Shafer, Egryphon@cpan.orgE +Gryphon Shafer Egryphon@cpan.orgE. + + code('Perl') || die; =head1 LICENSE