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

Re: [ID 20000405.021] Pod::Man bug

Thread Previous | Thread Next
From:
M.J.T. Guy
Date:
April 24, 2000 10:41
Subject:
Re: [ID 20000405.021] Pod::Man bug
Message ID:
E12jmrm-0003QN-00@ursa.cus.cam.ac.uk
Russ Allbery <rra@stanford.edu> wrote
> Brad, this bit of code looks odd to me, from Pod::InputObjects in
> Pod::Parser 1.13:
> 
> sub children {
>    my $self = shift;
>    if (@_ > 0) {
>       @{ $self } = (@_ == 1  and  ref $_[0]) ? ${ @_ } : @_;
>    }
>    return @{ $self };
> }
> 
> Shouldn't that be "(@_ == 1  and  ref $_[0]) ? @{ @_ } : @_"?

Do you *really* want to operate on @1 ?    :-)

Perhaps you mean    "(@_ == 1  and  ref $_[0]) ? @{$_[0}} : @_"    ?


Mike Guy

Thread Previous | 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