> I hope I'm explaining this right. I am including a package:
> use Net::Telnet::Cisco
>
> that includes another package
> Net::Telnet
>
> How do I call a method from Net::Telnet? Do I have the "use" it
> explicitly?
>
> When I try something like:
> $x = Net::Telnet::Cisco->new( Host => $_[0] );
> $fh = x->input_log('input.log'); #input_log from Net::Telnet
>
> I get:
>
> Can't locate object method "input_log" via package "x" (perhaps you
> forgot to load "x"?) at ./telnettest line 38.
>
--
You have a syntax error, since you have not added a '$' in front of
x,
Perl believes you are perhaps refering to a package (named x).
Try this instead:
$fh = $x->input_log('input.log'); #input_log from Net::Telnet
However, if 'input_log' in a method of Net::Telnet only, then you
must
make sure that Net::Telnet::Cisco inherit from Net::Telnet
or else it will not be found. See the documentation on
Net::Telnet::Cisco
as I have never used it.
-Robin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]