- or download this
use strict;
use warnings;
...
# Extra parameters (R/W) returned are the extra param passed to forEac
+h()
$f->myhash_forEach(sub{print "Object f (HashRef): myhash KEY:$_[0]; VA
+LUE:$_[1]; Extra args($_[2],", ++$_[3],")\n"},
"Extra-arg1", 25);
- or download this
BEGIN{
package Object::Tiny;
...
1;
}
- or download this
$ perl test-obj-tiny.pl
Object f Scalar: baz=> Value of baz;
...
Object f (HashRef): myhash KEY:Dos; VALUE:Two; Extra args(Extra-arg1,2
+6)
Object f (HashRef): myhash KEY:Tres; VALUE:Three; Extra args(Extra-arg
+1,27)
Object f (HashRef): myhash KEY:Uno; VALUE:One; Extra args(Extra-arg1,2
+8)