From: Ben Tilly Date: Mon, 10 Dec 2001 21:30:20 +0000 (-0500) Subject: Exporter's documentation shouldn't lie X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e60ce1729cda5301741bacaf05ccb8f08bd08c0b;p=p5sagit%2Fp5-mst-13.2.git Exporter's documentation shouldn't lie Message-ID: <3C4AA201@operamail.com> p4raw-id: //depot/perl@13611 --- diff --git a/lib/Exporter.pm b/lib/Exporter.pm index 9088a31..6459312 100644 --- a/lib/Exporter.pm +++ b/lib/Exporter.pm @@ -147,10 +147,11 @@ informally indicate that they are 'internal' and not for public use. (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