Change 13611 by jhi@alpha on 2001/12/11 04:29:32

        Subject: Exporter's documentation shouldn't lie               
        From: "Benjamin J. Tilly" <[EMAIL PROTECTED]>
        Date: Mon, 10 Dec 2001 21:30:20 -0500
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

.... //depot/perl/lib/Exporter.pm#20 edit

Differences ...

==== //depot/perl/lib/Exporter.pm#20 (text) ====
Index: perl/lib/Exporter.pm
--- perl/lib/Exporter.pm.~1~    Mon Dec 10 21:45:05 2001
+++ perl/lib/Exporter.pm        Mon Dec 10 21:45:05 2001
@@ -147,10 +147,11 @@
 (It is actually possible to get private functions by saying:
 
   my $subref = sub { ... };
-  &$subref;
+  $subref->(@args);            # Call it as a function
+  $obj->$subref(@args);        # Use it as a method
 
-But there's no way to call that directly as a method, since a method
-must have a name in the symbol table.)
+However if you use them for methods it is up to you to figure out
+how to make inheritance work.)
 
 As a general rule, if the module is trying to be object oriented
 then export nothing. If it's just a collection of functions then
End of Patch.

Reply via email to