diff options
author | Ben Tilly <ben_tilly@operamail.com> | 2001-12-10 16:30:20 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-11 04:29:32 +0000 |
commit | e60ce1729cda5301741bacaf05ccb8f08bd08c0b (patch) | |
tree | 0f09d8ec19801f092acece7e1cf22ffd14a18278 | |
parent | 0d3cd356f86a61e8bd16da8cde1ac079d7e66290 (diff) | |
download | perl-e60ce1729cda5301741bacaf05ccb8f08bd08c0b.tar.gz |
Exporter's documentation shouldn't lie
Message-ID: <3C4AA201@operamail.com>
p4raw-id: //depot/perl@13611
-rw-r--r-- | lib/Exporter.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Exporter.pm b/lib/Exporter.pm index 9088a31482..6459312d75 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 |