in reply to Re: "Undefined subroutine &main::pcap_lookupdev called" yet module installed and PERL5LIB is set correctly : *(
in thread "Undefined subroutine &main::pcap_lookupdev called" yet module installed and PERL5LIB is set correctly : *(

Hi Thanks for your help. I tried "use Net::Pcap qw( :all );" and got :
[mddev@mdsaln01:~/mdscripts/bin] $ ./pcapTest.pl "all" is not defined in %Net::Pcap::EXPORT_TAGS at ./pcapTest.pl line +3 main::BEGIN() called at /opt/devel/mdscripts/PerlModules/lib/N +et/Pcap.pm line 3 eval {...} called at /opt/devel/mdscripts/PerlModules/lib/Net/ +Pcap.pm line 3 Can't continue after import errors at ./pcapTest.pl line 3 BEGIN failed--compilation aborted at ./pcapTest.pl line 3. [mddev@mdsaln01:~/mdscripts/bin] $ </code ..and I tried :functions instead and got the same as at the beginning +: <code> [mddev@mdsaln01:~/mdscripts/bin] $ ./pcapTest.pl Undefined subroutine &main::pcap_lookupdev called at ./pcapTest.pl lin +e 7. [mddev@mdsaln01:~/mdscripts/bin] $
: ((
  • Comment on Re^2: "Undefined subroutine &main::pcap_lookupdev called" yet module installed and PERL5LIB is set correctly : *(
  • Download Code

Replies are listed 'Best First'.
Re^3: "Undefined subroutine &main::pcap_lookupdev called" yet module installed and PERL5LIB is set correctly : *(
by ikegami (Patriarch) on Jun 10, 2009 at 15:11 UTC
    oops, should be :functions, not :all. Fixed
      Hi Thanks again : ) I tried "use Net::Pcap qw( :functions );" and got the same error as the first time :
      [mddev@mdsaln01:~/mdscripts/bin] $ ./pcapTest.pl Undefined subroutine &main::pcap_lookupdev called at ./pcapTest.pl lin +e 6. [mddev@mdsaln01:~/mdscripts/bin] $
      I've got to get this working and this is driving me crazy. The PERL interpreter can clearly find the module but doesn't like the subroutines that it is supposed to be exporting.

        The PERL interpreter can clearly find the module but doesn't like the subroutines that it is supposed to be exporting.

        Perl (the language) and perl (the interpreter) have nothing to do with exporting (it's all up to the module), and the subs weren't supposed to be exported until you used :functions. Your problem with :functions is different, even though it results in the same error message.