[Bps-public-commit] Symbol-Global-Name branch, master, updated. 436b101cdbd792c6c1f4e34c461b8f7a47cadc6a

Ruslan Zakirov ruz at bestpractical.com
Wed Jan 12 09:39:49 EST 2011


The branch, master has been updated
       via  436b101cdbd792c6c1f4e34c461b8f7a47cadc6a (commit)
      from  dcf118d98dc579a3a3f843c573b67fd0951b78c3 (commit)

Summary of changes:
 README                    |   12 ++++++++++++
 lib/Symbol/Global/Name.pm |    1 +
 2 files changed, 13 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 436b101cdbd792c6c1f4e34c461b8f7a47cadc6a
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed Jan 12 17:39:05 2011 +0300

    update docs

diff --git a/README b/README
index 447544b..01b31c4 100644
--- a/README
+++ b/README
@@ -13,6 +13,18 @@ SYNOPSIS
 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 at bestpractical.com>
 
diff --git a/lib/Symbol/Global/Name.pm b/lib/Symbol/Global/Name.pm
index bb083c9..671aaff 100644
--- a/lib/Symbol/Global/Name.pm
+++ b/lib/Symbol/Global/Name.pm
@@ -38,6 +38,7 @@ our %REF_SYMBOLS = (
 =head2 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' );
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list