in reply to Modules: Building blocks for the Daft Adventure
Well, it all depends on how you setup your module.
If it is just a basic package that is not an object and does not \
use Exporter then you would call it like
If you use the Exporter module when creating your module, then you can (optionally) import the function name into the current namespace and just call it is asRPG::DND::modifer(argument list here);
If you make RPG::DND an object, you would create an object of that type, something like my $rpg = new RPG::DND;, and then you would call it likemodifer(argument list);
Also, you might want to name it something like getModifer rather than just modifier so it is slightly clearer on what the subroutine does.$rpg->modifier(arguments);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Modules: Building blocks for the Daft Adventure
by Tiefling (Monk) on Jun 12, 2001 at 15:47 UTC | |
by modred (Pilgrim) on Jun 12, 2001 at 15:55 UTC |
In Section
Seekers of Perl Wisdom