1 package SQL::Abstract::Parts;
3 use Module::Runtime ();
8 use overload '""' => 'stringify', fallback => 1;
11 my ($proto, $join, @parts) = @_;
13 $join, map Scalar::Util::blessed($_) ? [ @$_ ] : $_, @parts
14 ], ref($proto) || $proto);
19 ::Dwarn([ STR => $self ]);
20 my ($join, @parts) = @$self;
21 return join($join, map +(ref() ? stringify($_) : $_), @parts);
24 sub to_array { return @{$_[0]} }
27 my ($self, %opts) = @_;
28 Module::Runtime::use_module('SQL::Abstract::Formatter')
33 my ($self, %opts) = @_;
34 $self->formatter(%opts)
35 ->format($self->to_array);