perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: 答复: 答复: Class inheritance, and SUPER under mod_perl2
Date Thu, 16 Aug 2007 02:11:03 GMT
Nguyen Vu Hung <vu-hung@cnt.mxt.nes.nec.co.jp> writes:

> Here is the code ( check if $obj is undefined inside foreach )
>
> ------------
> package XXX::YYY3;
>
> @ISA = qw(Net::Cmd IO::Socket::INET);
>
> sub new
> {
> my $self = shift;
> my $type = ref($self) || $self;
>
> my $hosts = "localhost";
> my $obj;
> my @localport = ();
>
> my $h;
> foreach $h (@{$hosts})

Are you using symrefs or something? $hosts here is
a scalar, not an arrayref.  Are you sure the loop
is being entered at all?


-- 
Joe Schaefer


Mime
View raw message