![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
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 as
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 like
Also, you might want to name it something like getModifer rather than just modifier so it is slightly clearer on what the subroutine does. In reply to Re: Modules: Building blocks for the Daft Adventure
by modred
|
|