- or download this
package Foo;
sub new { return bless ( { count => 1 } ) }
sub count { $_[0]->{count}++ }
1;
- or download this
use Foo;
use Template;
...
Call: [% bar.count %]
Call: [% bar.count %]
Call: [% bar.count %]
- or download this
I am calling methods on the object named 'bar':
Call: 1
Call: 2
Call: 3