in reply to Re^8: "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 : *(

I can see now that the sub names are not prefixed with "pcap_" as the documentation suggests...

Proof that they are. grep -r pcap_lookupdev Net-Pcap-0.16

http://cpansearch.perl.org/src/SAPER/Net-Pcap-0.16/eg/pcapdump

  • Comment on Re^9: "Undefined subroutine &main::pcap_lookupdev called" yet module installed and PERL5LIB is set correctly : *(

Replies are listed 'Best First'.
Re^10: "Undefined subroutine &main::pcap_lookupdev called" yet module installed and PERL5LIB is set correctly : *(
by Khen1950fx (Canon) on Jun 11, 2009 at 06:28 UTC
    Good point; however the issue here isn't subs but functions. "pcap_lookupdev" isn't listed under functions in the source but "lookupdev" is. There's a big difference.

      "pcap_lookupdev" isn't listed under functions in the source but "lookupdev" is

      You are mistaken. pcap_lookdev is in both :functions (via @func_long_names) and in the namespace (via *{ __PACKAGE__ . "::pcap_$func" }).

        sorry, in my happiness I missed the fact that the long names should still work, thanks for pointing that out. I've got no idea why they don't work tho...