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 my ($join, @parts) = @$self;
20 return join($join, map +(ref() ? stringify($_) : $_), @parts);
23 sub to_array { return @{$_[0]} }
26 my ($self, %opts) = @_;
27 Module::Runtime::use_module('SQL::Abstract::Formatter')
32 my ($self, %opts) = @_;
33 $self->formatter(%opts)
34 ->format($self->to_array);