X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlsub.pod;h=719197e57112b4ac84d763d0fb579642959cbabb;hb=cc7ef057bab1579c0576d0a578186a6e5ae298e2;hp=918f429a32ae1f277bd64272128decc01b386756;hpb=163e3a99f83605ff107fb86a86c7dd9dc9dece8f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 918f429..719197e 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -325,14 +325,8 @@ it. Similarly, in the conditional the scope of $answer extends from its declaration through the rest of that conditional, including any C and C clauses, -but not beyond it. - -B The behaviour of a C statement modified with a statement -modifier conditional or loop construct (e.g. C) is -B. The value of the C variable may be C, any -previously assigned value, or possibly anything else. Don't rely on -it. Future versions of perl might do something different from the -version of perl you try it out on. Here be dragons. +but not beyond it. See L for information +on the scope of variables in statements with modifiers. The C loop defaults to scoping its index variable dynamically in the manner of C. However, if the index variable is @@ -1265,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<< >>. @@ -1285,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 @@ -1311,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.