Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Net::Oscar crashes Perl

by karstenda (Acolyte)
on Jan 16, 2009 at 22:17 UTC ( [id://736952]=perlquestion: print w/replies, xml ) Need Help??

karstenda has asked for the wisdom of the Perl Monks concerning the following question:

Greetings monks!

I've run into a problem while using the Net::OSCAR module.
Everytime I use this module, the perl interpreter crashes and outputs the following data:

C:\Users\admin\Desktop\Proglab>oscar.pl Prototype mismatch: sub Net::OSCAR::Connection::F_GETFL () vs none at +(eval 5) l ine 1. Prototype mismatch: sub Net::OSCAR::Connection::F_SETFL () vs none at +(eval 6) l ine 1. Prototype mismatch: sub Net::OSCAR::Connection::O_NONBLOCK () vs none +at (eval 7 ) line 1.

I've removed and reinstalled this module using the perlpackagemanager and the cpan shell with no effect ...

I googled a bit and stumbled on the following site: https://forum.antichat.ru/printthread.php?t=84286&pp=40" It looks like these man had the same problem, unfortunately it's all written in russian :-(

Any ideas on how to solve this?

Replies are listed 'Best First'.
Re: Net::Oscar crashes Perl
by ikegami (Patriarch) on Jan 16, 2009 at 22:32 UTC

    That question came up before. You're getting the warning because you turned on warnings on someone else's code (by using -w instead of use warnings;). The warning is harmless. It can be fixed by changing

    if($^O eq "MSWin32") { eval '*F_GETFL = sub {0};'; eval '*F_SETFL = sub {0};'; eval '*O_NONBLOCK = sub {0}; '; }

    to

    if($^O eq "MSWin32") { eval '*F_GETFL = sub () {0};'; eval '*F_SETFL = sub () {0};'; eval '*O_NONBLOCK = sub () {0}; '; }

    I can't comment on any crashing.

      Forgive me I'm a bit new to perl, where should I replace this code?

      Replacing -w to use warnings; had no effect so far.

        That code is in the module you mentioned.

        Interesting. The warning appears whether warnings are enabled or not.

Re: Net::Oscar crashes Perl
by mikelieman (Friar) on Jan 16, 2009 at 22:24 UTC
    What modules does Net::OSCAR depend on?
      Net::OSCAR:
      This modules requires Digest::MD5 and Scalar::Util. Test::More is needed to run the test suite, and XML::Parser is needed to generate the XML parse tree which is shipped with released versions.

      source: http://search.cpan.org/~matthewg/Net-OSCAR-1.925/lib/Net/OSCAR.pm

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://736952]
Approved by SankoR
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-19 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found