Next | The Perl Hardware Store | DC.pm Version | 11 |
package Cookout;
# Always export `grill': sub import { # Get name of calling package my $caller = caller;
*{$caller . '::grill} = \&grill; }
Now any other package can say
use Cookout;
grill('corn', 'burgers', 'kebabs');
Next | Copyright © 2003 M. J. Dominus |