in reply to Creating stub methods
=head1 NAME subs - Perl pragma to declare sub names and initialize them? =head1 SYNOPSIS use subs::i start_html => \&AUTOLOAD; =cut package subs::i; sub import { my $callpack = caller; my $pack = shift; my %imports = @_; foreach $sym (keys %imports) { *{"${callpack}::$sym"} = $imports{$sym}; } };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Creating stub methods
by Ovid (Cardinal) on Dec 29, 2003 at 18:18 UTC | |
by Aristotle (Chancellor) on Dec 30, 2003 at 08:45 UTC |