package Foo::Simple; require Exporter; push our @ISA, "Exporter"; our @EXPORT = ("bar", "barprint"); use Foo; my $foo; sub _init { $foo = Foo->new(@_); } sub bar { $foo or _init(); $foo->load(@_); $foo->process(); $foo->error() ? undef : $foo->results(); } sub barprint { $foo or _init(); $foo->load(@_); $foo->process(); if (my $err = $foo->error()) { print STDERR $err, "\n"; } else { print $foo->results(); } } 1; __END__
In reply to Foo::Simple by ambrus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |