]> git.vpit.fr Git - perl/modules/subs-auto.git/blobdiff - README
Document that the pragma doesn't propagate into eval STRING
[perl/modules/subs-auto.git] / README
diff --git a/README b/README
index 674535ce4fa6ddc4fa36a5de8d0e87b8250d4026..feb777783d24f16518bbd0cfb87b2689aef95a75 100644 (file)
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ NAME
     subs::auto - Read barewords as subroutine names.
 
 VERSION
     subs::auto - Read barewords as subroutine names.
 
 VERSION
-    Version 0.01
+    Version 0.05
 
 SYNOPSIS
         {
 
 SYNOPSIS
         {
@@ -16,7 +16,7 @@ SYNOPSIS
          foo->meth;       # "'foo'->meth" if you have use'd foo somewhere,
                           #  or "foo()->meth" otherwise
          print foo 'wut'; # print to the filehandle foo if it's actually one,
          foo->meth;       # "'foo'->meth" if you have use'd foo somewhere,
                           #  or "foo()->meth" otherwise
          print foo 'wut'; # print to the filehandle foo if it's actually one,
-                          #  or "foo()->print('wut')" otherwise
+                          #  or "print(foo('wut'))" otherwise
         } # ... but function calls will fail at run-time if you don't
           # actually define foo somewhere
     
         } # ... but function calls will fail at run-time if you don't
           # actually define foo somewhere
     
@@ -25,9 +25,22 @@ SYNOPSIS
 DESCRIPTION
     This pragma lexically enables the parsing of any bareword as a
     subroutine name, except those which corresponds to an entry in %INC
 DESCRIPTION
     This pragma lexically enables the parsing of any bareword as a
     subroutine name, except those which corresponds to an entry in %INC
-    (expected to be class names) or whose symbol table entry has a IO slot
+    (expected to be class names) or whose symbol table entry has an IO slot
     (expected to be filehandles).
 
     (expected to be filehandles).
 
+    You can pass options to "import" as key / value pairs :
+
+    *   "in => $pkg"
+
+        Specifies on which package the pragma should act. Setting $pkg to
+        "Some::Package" allows you to resolve all functions name of the type
+        "Some::Package::func ..." in the current scope. You can use the
+        pragma several times with different package names to allow
+        resolution of all the corresponding barewords. Defaults to the
+        current package.
+
+    This module is not a source filter.
+
 EXPORT
     None.
 
 EXPORT
     None.
 
@@ -41,6 +54,10 @@ CAVEATS
     outside (or by actually defining "foo", which is ultimately why you use
     this pragma, right ?).
 
     outside (or by actually defining "foo", which is ultimately why you use
     this pragma, right ?).
 
+    You have to open global filehandles outside of the scope of this pragma
+    if you want them not to be treated as function calls. Or just use
+    lexical filehandles and default ones as you should be.
+
 DEPENDENCIES
     perl 5.10.0.
 
 DEPENDENCIES
     perl 5.10.0.
 
@@ -52,8 +69,7 @@ DEPENDENCIES
 AUTHOR
     Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.
 
 AUTHOR
     Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.
 
-    You can contact me by mail or on #perl @ FreeNode (vincent or
-    Prof_Vince).
+    You can contact me by mail or on "irc.perl.org" (vincent).
 
 BUGS
     Please report any bugs or feature requests to "bug-subs-auto at
 
 BUGS
     Please report any bugs or feature requests to "bug-subs-auto at