In perl.git, the branch maint-5.10 has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c2883528fec0925d63da1be703734b576173ecad?hp=836440f600bbb4a6dc8bb661536f81681032312a>

- Log -----------------------------------------------------------------
commit c2883528fec0925d63da1be703734b576173ecad
Author: Rafael Garcia-Suarez <[email protected]>
Date:   Fri Jul 24 11:13:44 2009 +0200

    Rephrase note about CHECK and INIT in eval("") in perlmod
    
    (based on suggestions by David Nicol and chromatic)
    
    (cherry picked from commit 98107fc72616109aca5e0f235c7401288a09bd2f)

M       pod/perlmod.pod

commit 1c713ab6e9802a63863e1d9997647d200127a5a6
Author: Rafael Garcia-Suarez <[email protected]>
Date:   Fri Jul 24 09:26:52 2009 +0200

    Thinko in given() description, found by chromatic
    
    (cherry picked from commit 107bd1173cd0e834849d7ce5b0c1212929791181)

M       pod/perlsyn.pod

commit 23b187cd953376785e7871e097d20d1876c9fb59
Author: Rafael Garcia-Suarez <[email protected]>
Date:   Fri Jul 24 08:15:45 2009 +0200

    Todo: decapsulation of smart match argument
    
    (cherry picked from commit 2d0587d88005126a9e730f38f7feb0c203e238a4)

M       pod/perltodo.pod
-----------------------------------------------------------------------

Summary of changes:
 pod/perlmod.pod  |   10 +++++-----
 pod/perlsyn.pod  |    2 +-
 pod/perltodo.pod |    7 +++++++
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/pod/perlmod.pod b/pod/perlmod.pod
index 3d5f3ad..4a7c62d 100644
--- a/pod/perlmod.pod
+++ b/pod/perlmod.pod
@@ -273,11 +273,6 @@ and such from other files in time to be visible to the 
rest of the compile
 and run time.  Once a C<BEGIN> has run, it is immediately undefined and any
 code it used is returned to Perl's memory pool.
 
-It should be noted that C<BEGIN> and C<UNITCHECK> code blocks B<are>
-executed inside string C<eval()>'s.  The C<CHECK> and C<INIT> code
-blocks are B<not> executed inside a string eval, which e.g. can be a
-problem in a mod_perl environment.
-
 An C<END> code block is executed as late as possible, that is, after
 perl has finished running the program and just before the interpreter
 is being exited, even if it is exiting as a result of a die() function.
@@ -316,6 +311,11 @@ in the Perl compiler suite to save the compiled state of 
the program.
 C<INIT> blocks are run just before the Perl runtime begins execution, in
 "first in, first out" (FIFO) order.
 
+The C<CHECK> and C<INIT> code blocks will not be executed inside a string
+eval(), if that eval() happens after the end of the main compilation
+phase; that can be a problem in mod_perl and other persistent environments
+which use C<eval STRING> to load code at runtime.
+
 When you use the B<-n> and B<-p> switches to Perl, C<BEGIN> and
 C<END> work just as they do in B<awk>, as a degenerate case.
 Both C<BEGIN> and C<CHECK> blocks are run when you use the B<-c>
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod
index 436c6e2..147844a 100644
--- a/pod/perlsyn.pod
+++ b/pod/perlsyn.pod
@@ -615,7 +615,7 @@ you want. For example you could write:
     when (/^\d+$/ && $_ < 75) { ... }
 
 Another useful shortcut is that, if you use a literal array
-or hash as the argument to C<when>, it is turned into a
+or hash as the argument to C<given>, it is turned into a
 reference. So C<given(@foo)> is the same as C<given(\...@foo)>,
 for example.
 
diff --git a/pod/perltodo.pod b/pod/perltodo.pod
index 20bc8da..4b6977c 100644
--- a/pod/perltodo.pod
+++ b/pod/perltodo.pod
@@ -837,6 +837,13 @@ It would be nice to forbid labels with keyword names, to 
avoid confusion.
 The prototype of truncate() is currently C<$$>. It should probably
 be C<*$> instead. (This is changed in F<opcode.pl>)
 
+=head2 decapsulation of smart match argument
+
+Currently C<$foo ~~ $object> will die with the message "Smart matching a
+non-overloaded object breaks encapsulation". It would be nice to allow
+to bypass this by using explictly the syntax C<$foo ~~ %$object> or
+C<$foo ~~ @$object>.
+
 =head2 error reporting of [$a ; $b]
 
 Using C<;> inside brackets is a syntax error, and we don't propose to change

--
Perl5 Master Repository

Reply via email to