blob: 6c7a6caf8239d6e21805fc28c694ba7141bc8fe3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
Implements a Perl 5 native version of what the Perl 6 symbol export mechanism
will look like.
It's very straightforward:
* If you want a subroutine to be capable of being exported (when
explicitly requested in the use arguments), you mark it with the
:Export attribute.
* If you want a subroutine to be automatically exported when the module
is used (without specific overriding arguments), you mark it with the
:Export(:DEFAULT) attribute.
* If you want a subroutine to be automatically exported when the module
is used (even if the user specifies overriding arguments), you mark it
with the :Export(:MANDATORY) attribute.
* If the subroutine should also be exported when particular export
groups are requested, you add the names of those export groups to the
attribute's argument list.
That's it.
WWW: https://metacpan.org/release/Perl6-Export-Attrs
|