diff options
Diffstat (limited to 'lib/Config/AST/Node/Value.pm')
-rw-r--r-- | lib/Config/AST/Node/Value.pm | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/lib/Config/AST/Node/Value.pm b/lib/Config/AST/Node/Value.pm index b1036bf..98770c2 100644 --- a/lib/Config/AST/Node/Value.pm +++ b/lib/Config/AST/Node/Value.pm @@ -137,44 +137,7 @@ use overload my $res = $self->as_string cmp "$other"; return $swap ? - $res : $res; }, - '+' => sub { - my ($self, $other) = @_; - return $self->as_number + $other; - }, - '-' => sub { - my ($self, $other, $swap) = @_; - my $d = $self->as_number - $other; - return $swap ? - $d : $d; - }, - '*' => sub { - my ($self, $other) = @_; - return $self->as_number * $other; - }, - '/' => sub { - my ($self, $other, $swap) = @_; - if ($swap) { - return $other / $self->as_number; - } else { - return $self->as_number / $other; - } - }, - '%' => sub { - my ($self, $other, $swap) = @_; - if ($swap) { - return $other % $self->as_number; - } else { - return $self->as_number % $other; - } - }, - '**' => sub { - my ($self, $other, $swap) = @_; - if ($swap) { - return $other ** $self->as_number; - } else { - return $self->as_number ** $other; - } - } -; + fallback => 1; =head1 SEE ALSO |