in reply to how to export a method
You'll need to require Exporter; and inherit before your @EXPORT will have any effect.
See Exporter for examples, but usually it goes something like this:
require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(rp);
Also, perhaps you've already thought it through, but if not, I'd suggest carefully considering whether you want to export a function called rp into the caller's namespace by default. Consider using @EXPORT_OK instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to export a method
by afoken (Chancellor) on Oct 22, 2019 at 20:30 UTC | |
by wanna_code_perl (Friar) on Oct 23, 2019 at 07:38 UTC | |
by toothedsword (Sexton) on Oct 23, 2019 at 00:07 UTC | |
|
Re^2: how to export a method
by toothedsword (Sexton) on Oct 22, 2019 at 03:17 UTC | |
by wanna_code_perl (Friar) on Oct 22, 2019 at 03:48 UTC | |
by toothedsword (Sexton) on Oct 22, 2019 at 05:45 UTC | |
by AnomalousMonk (Archbishop) on Oct 22, 2019 at 06:36 UTC | |
by toothedsword (Sexton) on Oct 22, 2019 at 15:06 UTC | |
by wanna_code_perl (Friar) on Oct 22, 2019 at 05:56 UTC | |
by toothedsword (Sexton) on Oct 22, 2019 at 06:05 UTC |