develooper Front page | perl.perl5.porters | Postings from March 2000

Pod::InputObjects patch for plain refs

Thread Next
From:
Russ Allbery
Date:
March 5, 2000 05:02
Subject:
Pod::InputObjects patch for plain refs
Message ID:
yl8zzxmuyj.fsf@windlord.stanford.edu
I'd like to be able to use plain (unblessed scalar) refs in Pod::Man to
mark text as already processed; I think you'd already tried to patch
Pod::Parser for me to allow this.  But in 1.11, this still doesn't work
quite right.  I think this patch will fix the logic.

Be cool to get this in before the next Perl release, although I realize
it's late in the game for that.

--- InputObjects.pm.orig        Fri Feb 25 16:26:46 2000
+++ InputObjects.pm     Sun Mar  5 04:59:02 2000
@@ -522,7 +522,7 @@
    my ($self, @children) = @_;
    ## Make sure any sequences know who their parent is
    for (@children) {
-      next unless (ref || ref eq 'SCALAR');
+      next if (!ref || ref eq 'SCALAR');
       if ($_->isa('Pod::InteriorSequence') or $_->can('nested')) {
           $_->nested($self);
       }

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About