in reply to Modules: Building blocks for the Daft Adventure
In RPG/DND.pm
package RPG::DND; use Exporter; use vars qw(@ISA @EXPORT_OK); @ISA = qw(Exporter); @EXPORT_OK = qw(modifier); sub modifier { int($_[0]/2)-5 }; 1;
In another_script.pl
--use RPG::DND qw(modifier); # lots of code modifier($value); # lots of other code
<http://www.dave.org.uk>
Perl Training in the UK <http://www.iterative-software.com>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Modules: Building blocks for the Daft Adventure
by Tiefling (Monk) on Jun 12, 2001 at 15:52 UTC | |
by davorg (Chancellor) on Jun 12, 2001 at 16:06 UTC | |
by ryddler (Monk) on Jun 12, 2001 at 19:14 UTC |
In Section
Seekers of Perl Wisdom