Perl x Open Food Facts Hackathon: Paris, France - May 24-25 Learn more
12345678910111213141516 package Weed::Tie::ArrayLength;use Weed::Perl;our $VERSION = '0.009';use Tie::Scalar;use base 'Tie::StdScalar';sub TIESCALAR { bless \$_[1], $_[0] }sub FETCH { @${ $_[0] } }sub STORE { $#${ $_[0] } = $_[1] - 1 }1;__END__
package
Weed::Tie::ArrayLength;
use
Weed::Perl;
our
$VERSION
=
'0.009'
;
Tie::Scalar;
base
'Tie::StdScalar'
sub
TIESCALAR {
bless
\
$_
[1],
[0] }
FETCH { @${
[0] } }
STORE { $
#${ $_[0] } = $_[1] - 1 }
1;
__END__