Data::Query::ExprBuilder->new({
expr => {
type => DQ_OPERATOR,
- operator => { perl => $op },
+ operator => { Perl => $op },
args => [ $_[0]->{expr} ]
}
});
Data::Query::ExprBuilder->new({
expr => {
type => DQ_OPERATOR,
- operator => { perl => $as },
+ operator => { Perl => $as },
args => [
map {
(Scalar::Util::blessed($_)
? $_->{expr}
: {
type => DQ_VALUE,
- subtype => { perl => 'Scalar' },
+ subtype => { Perl => 'Scalar' },
value => $_
}
# we're called with ($left, $right, 0) or ($right, $left, 1)
expr_is { $_->foo == 3 }
{
type => DQ_OPERATOR,
- operator => { perl => '==' },
+ operator => { Perl => '==' },
args => [
expr { $_->foo },
{
type => DQ_VALUE,
- subtype => { perl => 'Scalar' },
+ subtype => { Perl => 'Scalar' },
value => 3,
},
],
expr_is { $_->foo == 3 }
{
type => DQ_OPERATOR,
- operator => { perl => '==' },
+ operator => { Perl => '==' },
args => [
expr { $_->foo },
{
type => DQ_VALUE,
- subtype => { perl => 'Scalar' },
+ subtype => { Perl => 'Scalar' },
value => 3,
},
],
expr_is { 3 == $_->foo }
{
type => DQ_OPERATOR,
- operator => { perl => '==' },
+ operator => { Perl => '==' },
args => [
{
type => DQ_VALUE,
- subtype => { perl => 'Scalar' },
+ subtype => { Perl => 'Scalar' },
value => 3,
},
expr { $_->foo },
expr_is { $_->foo & $_->bar }
{
type => DQ_OPERATOR,
- operator => { perl => 'and' },
+ operator => { Perl => 'and' },
args => [
expr { $_->foo },
expr { $_->bar },
expr_is { $_->foo | $_->bar }
{
type => DQ_OPERATOR,
- operator => { perl => 'or' },
+ operator => { Perl => 'or' },
args => [
expr { $_->foo },
expr { $_->bar },
expr_is { !$_->foo }
{
type => DQ_OPERATOR,
- operator => { perl => '!' },
+ operator => { Perl => '!' },
args => [ expr { $_->foo } ],
},
'! ok';