Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: An introduction to POE

by NetWallah (Abbot)
on Aug 10, 2003 at 15:14 UTC ( #282633=note: print w/ replies, xml ) Need Help??


in reply to An introduction to POE

I'm having trouble getting this sample POE code to work under Win32 (XP) with Activestate Perl 5.8.0. I have installed the POE, TermReadKey, and Term-Cap modules. Here is the error I get:

>perl poetest.pl Your vendor has not defined POSIX macro B38400, used at D:/Perl/site/l +ib/POE/Whe el/ReadLine.pm line 89 Compilation failed in require at (eval 31) line 1. BEGIN failed--compilation aborted at (eval 31) line 1. could not import qw(Wheel::ReadLine) at poetest.pl line 5 BEGIN failed--compilation aborted at poetest.pl line 5. E:\Documents and Settings\vijay\test>perl -v
Seems like I may need to install Cygwin. But I'm curious as to what this macro at line 89 is, and if there is a workaround for Win32 - here is the relevant code from the ReadLine.pm module:
Line 12: use POSIX qw(B38400); Line 88: # Get the terminal speed for Term::Cap. my $ospeed = B38400;


Comment on Re: An introduction to POE
Select or Download Code
Re: Re: An introduction to POE
by rcaputo (Chaplain) on Aug 28, 2003 at 06:26 UTC
    Seems like I may need to install Cygwin. But I'm curious as to what this macro at line 89 is, and if there is a workaround for Win32

    The B38400 constant is exported by the standard POSIX module. It represents 38400 baud terminal rates, the fastest available under POSIX. Windows doesn't use standard terminals, so B38400 is useless in ActivePerl. Unfortunately, ActivePerl doesn't support B38400 with a dummy value, so code relying on it breaks there.

    The problem is easy enough to work around if the author knows about it. Just check $^O eq 'MSWin32' and either avoid B38400 altogether or define a dummy version of it so the code continues on.

    Check rt.cpan.org for an effective way to report bugs in CPAN distributions.

    -- Rocco Caputo - rcaputo@pobox.com - poe.perl.org

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://282633]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-12-20 21:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (99 votes), past polls