Some more perlio doc tweaks based on NI-S.
[p5sagit/p5-mst-13.2.git] / pod / perlsub.pod
index 2b33bd8..719197e 100644 (file)
@@ -220,9 +220,9 @@ Synopsis:
     my @oof = @bar;    # declare @oof lexical, and init it
     my $x : Foo = $y;  # similar, with an attribute applied
 
-B<WARNING>: The use of attribute lists on C<my> declarations is
-experimental.  This feature should not be relied upon.  It may
-change or disappear in future releases of Perl.  See L<attributes>.
+B<WARNING>: The use of attribute lists on C<my> declarations is still
+evolving.  The current semantics and interface are subject to change.
+See L<attributes> and L<Attribute::Handlers>.
 
 The C<my> operator declares the listed variables to be lexically
 confined to the enclosing block, conditional (C<if/unless/elsif/else>),
@@ -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<elsif> and C<else> clauses, 
-but not beyond it.
-
-B<NOTE:> The behaviour of a C<my> statement modified with a statement
-modifier conditional or loop construct (e.g. C<my $x if ...>) is
-B<undefined>.  The value of the C<my> variable may be C<undef>, 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<perlsyn/"Simple statements"> for information
+on the scope of variables in statements with modifiers.
 
 The C<foreach> loop defaults to scoping its index variable dynamically
 in the manner of C<local>.  However, if the index variable is
@@ -686,7 +680,7 @@ subroutine never gets that chance.  Consider;
 
     # set_arr_lv cannot stop this !
     set_arr_lv() = { a => 1 };
-       
+
 =back
 
 =head2 Passing Symbol Table Entries (typeglobs)
@@ -1157,8 +1151,8 @@ only occasionally and for good reason.  Typically this might be
 done by a package attempting to emulate missing built-in functionality
 on a non-Unix system.
 
-Overriding may be done only by importing the name from a
-module--ordinary predeclaration isn't good enough.  However, the
+Overriding may be done only by importing the name from a module at
+compile time--ordinary predeclaration isn't good enough.  However, the
 C<use subs> pragma lets you, in effect, predeclare subs
 via the import syntax, and these names may then override built-in ones:
 
@@ -1265,7 +1259,7 @@ C<require> replacement as C<require Foo::Bar>, it will actually receive
 the argument C<"Foo/Bar.pm"> in @_.  See L<perlfunc/require>.
 
 And, as you'll have noticed from the previous example, if you override
-C<glob>, the C<E<lt>*E<gt>> glob operator is overridden as well.
+C<glob>, the C<< <*> >> glob operator is overridden as well.
 
 In a similar fashion, overriding the C<readline> function also overrides
 the equivalent I/O operator C<< <FILEHANDLE> >>.
@@ -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<AUTOLOAD> 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<import> or C<unimport> method is just skipped instead.)
 
 Many C<AUTOLOAD> 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.
@@ -1360,7 +1355,7 @@ parsed and invoked:
     use attributes __PACKAGE__, \&plugh, q[Ugly('\(")], 'Bad';
 
 For further details on attribute lists and their manipulation,
-see L<attributes>.
+see L<attributes> and L<Attribute::Handlers>.
 
 =head1 SEE ALSO