File: README

package info (click to toggle)
libsymbol-global-name-perl 0.05-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 152 kB
  • ctags: 118
  • sloc: perl: 1,437; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 969 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
NAME
    Symbol::Global::Name - finds name and type of a global variable

SYNOPSIS
        package My;
        our $VERSION = '0.1';

        use Symbol::Global::Name;
        print Symbol::Global::Name->find( \$VERSION );

        # prints '$My::VERSION'

DESCRIPTION
    Lookups symbol table to find an element by reference.

METHODS
  find
        Symbol::Global::Name->find( \$VERSION );
        Symbol::Global::Name->find( \$VERSION, package => 'My::Package' );
        Symbol::Global::Name->find( reference => \$VERSION );
        Symbol::Global::Name->find( reference => \$VERSION, package => 'My::Package' );

    Takes a reference and optional package name. Returns name of the
    referenced variable as long as it's in the package or sub-package and
    it's a global variable. Returned name is prefixed with type sigil, eg.
    '$', '@', '%', '&' or '*'.

AUTHOR
    Ruslan Zakirov <ruz@bestpractical.com>

LICENSE
    Under the same terms as perl itself.