Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bestpractical/symbol-global-name
https://github.com/bestpractical/symbol-global-name
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bestpractical/symbol-global-name
- Owner: bestpractical
- Created: 2011-01-12T14:21:05.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2014-02-13T20:45:59.000Z (almost 11 years ago)
- Last Synced: 2023-04-13T18:31:29.994Z (over 1 year ago)
- Language: Perl
- Homepage: http://search.cpan.org/dist/symbol-global-name
- Size: 184 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
Symbol::Global::Name - finds name and type of a global variableSYNOPSIS
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 ZakirovLICENSE
Under the same terms as perl itself.