The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use strict;
use warnings;

package Over;

use overload '""' => \&val, '0+' => \&val, fallback => 1;

sub new
{
  my $pkg = shift;
  my $val = shift;

  return bless \$val, $pkg;
}

sub val
{
  my $self = shift;
  return $$self;
}

1;