| 1 | =head1 NAME | ||
| 2 | |||
| 3 | Scalar::Footnote::Functions - under-the-hood functions for L<Scalar::Footnote> | ||
| 4 | |||
| 5 | =head1 SYNOPSIS | ||
| 6 | |||
| 7 | # Don't use this module directly! | ||
| 8 | # You should use the Scalar::Footnote API to access footnotes cleanly. | ||
| 9 | |||
| 10 | use Scalar::Footnote::Functions qw( set_footnote get_footnote remove_footnote ); | ||
| 11 | |||
| 12 | my $ref = []; | ||
| 13 | |||
| 14 | # attach invisible footnote to $ref: | ||
| 15 | set_footnote( $ref, 'footnote' ); | ||
| 16 | |||
| 17 | # get it back: | ||
| 18 | $footnote = get_footnote( $ref ); | ||
| 19 | |||
| 20 | # remove it: | ||
| 21 | $footnote = remove_footnote( $ref ); | ||
| 22 | |||
| 23 | # or you can do things OO-stylee: | ||
| 24 | $obj->Scalar::Footnote::set_footnote( $a_value ); | ||
| 25 | $note = Scalar::Footnote::get_footnote( $obj ); | ||
| 26 | $note = $obj->Scalar::Footnote::get_footnote; | ||
| 27 | $note = $obj->Scalar::Footnote::remove_footnote; | ||
| 28 | |||
| 29 | =cut | ||
| 30 | |||
| 31 | package Scalar::Footnote::Functions; | ||
| 32 | |||
| 33 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 34 | 5 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 35 | |||
| 36 | 5 | require Exporter; | |
| 37 | 5 | require DynaLoader; | |
| 38 | 5 | require AutoLoader; | |
| 39 | |||
| 40 | 5 | our @ISA = qw( Exporter DynaLoader ); | |
| 41 | 5 | our @EXPORT = qw( ); | |
| 42 | 5 | our @EXPORT_OK = qw( get_footnote set_footnote remove_footnote ); | |
| 43 | 5 | our $VERSION = '0.99_02'; | |
| 44 | |||
| 45 | 5 | bootstrap Scalar::Footnote::Functions $VERSION; | |
| 46 | |||
| 47 | 5 | 1; | |
| 48 | |||
| 49 | __END__ | ||