use warnings;
use Exporter 'import';
-our @EXPORT = qw('on');
+our @EXPORT = qw(on);
sub on (&) {
my ($on) = @_;
my %f = %$_;
my $as = delete $f{-as};
my ($f, $rhs) = %f;
- my $func = +{ "-${f}" => $rhs };
+ my $func = +{ ($f =~ /^-/ ? $f : "-${f}") => $rhs };
($as
? +{ -op => [ 'as', $func, { -ident => [ $as ] } ] }
: $func)
};
}
$self->$orig($table, $fields, $where, $rs_attrs, $limit, $offset);
-});
+};
sub expand_join_condition {
my ($self, $cond, $args) = @_;
__END__
+=head1 NAME
+
+DBIx::Class::SQLMaker::Role::SQLA2Passthrough - A test of future possibilities
+
+=head1 SYNOPSIS
+
+=over 4
+
+=item * select and group_by options are processed using the richer SQLA2 code
+
+=item * expand_join_condition is provided to more easily express rich joins
+
+=back
+
+See C<examples/sqla2passthrough.pl> for a small amount of running code.
+
=head1 SETUP
(on_connect_call => sub {
'foreign.priority' => { '>=', { -value => $_{min_priority} } } }
}]
);
+
+=cut