| 1 | package English::Reference; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | require Exporter; | |
| 7 | |||
| 8 | 1 | @ISA = qw(Exporter); | |
| 9 | # Items to export into callers namespace by default. Note: do not export | ||
| 10 | # names by default without a very good reason. Use EXPORT_OK instead. | ||
| 11 | # Do not simply export all your public functions/methods/constants. | ||
| 12 | 1 | @EXPORT = qw( | |
| 13 | ARRAY CODE GLOB HASH SCALAR | ||
| 14 | ); | ||
| 15 | 1 | @EXPORT_OK = qw( | |
| 16 | deref | ||
| 17 | ); | ||
| 18 | |||
| 19 | 1 | $VERSION = '0.01'; | |
| 20 | |||
| 21 | #bootstrap English::Reference $VERSION; | ||
| 22 | |||
| 23 | 1 | ▶ | sub ARRAY($) { |
|
Subroutine
ARRAY: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 24 | 1 | return @{ shift() }; | |
| 25 | } | ||
| 26 | 1 | ▶ | sub CODE($) { |
|
Subroutine
CODE: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 27 | 1 | return &{ shift() }; | |
| 28 | } | ||
| 29 | 1 | ▶ | sub GLOB($) { |
|
Subroutine
GLOB: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 30 | 1 | return *{ shift() }; | |
| 31 | } | ||
| 32 | 1 | ▶ | sub HASH($) { |
|
Subroutine
HASH: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 33 | 1 | return %{ shift() }; | |
| 34 | } | ||
| 35 | 2 | ▶ | sub SCALAR($) { |
|
Subroutine
SCALAR: called CC=1 SCAR=0.0
| |||
| 36 | 2 | return ${ shift() }; | |
| 37 | } | ||
| 38 | |||
| 39 | 0 | ▶ | sub deref($) { |
|
Subroutine
deref: not called CC=1 SCAR=0.6
Pod
undocumented
| |||
| 40 | 1 | ▶ | no strict qw(refs); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 41 | 0 | return &{ref($_[0])}($_[0]); | |
| 42 | } | ||
| 43 | |||
| 44 | 1 | 1; | |
| 45 | __END__ | ||