From: Yitzchak Scott-Thoennes Date: Tue, 2 Sep 2003 15:06:29 +0000 (-0700) Subject: some method calls not autoloaded X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=593b9c1462e1fc8a2425e215f64b2197e1bfb796;p=p5sagit%2Fp5-mst-13.2.git some method calls not autoloaded Message-ID: <20030902220629.GA2952@efn.org> p4raw-id: //depot/perl@21007 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 3a17659..069e7d2 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -2736,7 +2736,7 @@ C work. =item no Module -See the C function, which C is the opposite of. +See the C function, of which C is the opposite. =item oct EXPR @@ -6160,7 +6160,8 @@ features back into the current package. The module can implement its C method any way it likes, though most modules just choose to derive their C method via inheritance from the C class that is defined in the C module. See L. If no C -method can be found then the call is skipped. +method can be found then the call is skipped, even if there is an AUTOLOAD +method. If you do not want to call the package's C method (for instance, to stop your namespace from being altered), explicitly supply the empty list: @@ -6200,6 +6201,8 @@ through the end of the file). There's a corresponding C command that unimports meanings imported by C, i.e., it calls C instead of C. +It behaves exactly as C does with respect to VERSION, an +omitted LIST, empty LIST, or no unimport method being found. no integer; no strict 'refs'; diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 2969341..719197e 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -1259,7 +1259,7 @@ C replacement as C, it will actually receive the argument C<"Foo/Bar.pm"> in @_. See L. And, as you'll have noticed from the previous example, if you override -C, the C*E> glob operator is overridden as well. +C, the C<< <*> >> glob operator is overridden as well. In a similar fashion, overriding the C function also overrides the equivalent I/O operator C<< >>. @@ -1279,7 +1279,8 @@ been passed to the original subroutine. The fully qualified name of the original subroutine magically appears in the global $AUTOLOAD variable of the same package as the C routine. The name is not passed as an ordinary argument because, er, well, just -because, that's why... +because, that's why. (As an exception, a method call to a nonexistent +C or C method is just skipped instead.) Many C routines load in a definition for the requested subroutine using eval(), then execute that subroutine using a special @@ -1305,7 +1306,7 @@ even need parentheses: use subs qw(date who ls); date; who "am", "i"; - ls -l; + ls '-l'; A more complete example of this is the standard Shell module, which can treat undefined subroutine calls as calls to external programs.