Re: ??: ??: Class inheritance, and SUPER under mod_perl2

2007-08-19 Thread Nguyen Vu Hung
Joe Schaefer : Nguyen Vu Hung <[EMAIL PROTECTED]> writes: foreach $h (@{$hosts}) { $obj = $type->SUPER::new(PeerAddr => ($host = $h), Are you sure you want SUPER::new()? I think in your case it translates to Net::Cmd::new(), when your args suggest you want IO::Socket::INET::

Re: Class inheritance, and SUPER under mod_perl2

2007-08-15 Thread Perrin Harkins
On 8/15/07, Nguyen Vu Hung <[EMAIL PROTECTED]> wrote: > In the code below, the class XXX:YYY3 inherits Net::Cmd, > IO::Socket::Inet, create an object $obj with the SUPER keyword. > > As far as I know, this code works well under Apache 1.3, Perl 5.6, > mod_perl 1.3. > > But in current environment wh

Re: ??: ??: Class inheritance, and SUPER under mod_perl2

2007-08-15 Thread Joe Schaefer
Nguyen Vu Hung <[EMAIL PROTECTED]> writes: > foreach $h (@{$hosts}) > { > > $obj = $type->SUPER::new(PeerAddr => ($host = $h), Are you sure you want SUPER::new()? I think in your case it translates to Net::Cmd::new(), when your args suggest you want IO::Socket::INET::new(). > PeerPort => 110, #

Re: ??: ??: Class inheritance , and SUPER under mod_perl2

2007-08-15 Thread Nguyen Vu Hung
Joe Schaefer : Nguyen Vu Hung <[EMAIL PROTECTED]> 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 $

Re: 答复: 答复: Class inheritance, and SUPER under mod_perl2

2007-08-15 Thread Joe Schaefer
Nguyen Vu Hung <[EMAIL PROTECTED]> 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;

Re: 答复: 答复: 答复: Class inheritance, and SUPER under mod_perl2

2007-08-15 Thread Nguyen Vu Hung
erl@perl.apache.org > 主题: Re: 答复: 答复: Class inheritance, and SUPER under mod_perl2 > > Actually I did exactly what you told me yesterday and $obj was still > undefined. > > Here is the code ( check if $obj is undefined inside foreach ) > > > package XXX::YYY3; &g

Class inheritance, and SUPER under mod_perl2

2007-08-15 Thread Nguyen Vu Hung
Hello all, I am quite new to Perl, mod_perl and mod_perl2 so please excuse me for my questions. It my sounds noobish. In the code below, the class XXX:YYY3 inherits Net::Cmd, IO::Socket::Inet, create an object $obj with the SUPER keyword. As far as I know, this code works well under Apache 1.3,