ea27e1d897
This module prototypes the Perl 6 'exported' and 'exportable' traits in Perl 5. Instead of messing around with @EXPORT arrays, you just declare which subs are to be exported (or are exportable on request) as part of those subs. For example: sub foo is exported { # by default ... } sub bar is exportable { # on request ... }
15 lines
339 B
Text
15 lines
339 B
Text
This module prototypes the Perl 6 'exported' and 'exportable' traits
|
|
in Perl 5.
|
|
|
|
Instead of messing around with @EXPORT arrays, you just declare which subs
|
|
are to be exported (or are exportable on request) as part of those subs.
|
|
|
|
For example:
|
|
|
|
sub foo is exported { # by default
|
|
...
|
|
}
|
|
|
|
sub bar is exportable { # on request
|
|
...
|
|
}
|