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

Monks,

I've been searching for a way to print files in Windows and I found the module 'Win32::Printer'. The only problem is that it gives me the error that it needs Perl 5.8 at least and ActivePerl only has 5.6 out I'm pretty sure.

Does anybody have any suggestions or ideas on how I can accomplish this task? Thanks. =)
  • Comment on Printing in ActivePerl 5.6.1 under Windows

Replies are listed 'Best First'.
Re: Printing in ActivePerl 5.6.1 under Windows
by borisz (Canon) on Jun 16, 2004 at 22:21 UTC
Re: Printing in ActivePerl 5.6.1 under Windows
by antioch (Sexton) on Jun 17, 2004 at 00:57 UTC
    Ah, bleh -- didn't see it. I figured the newest think they had was just an update for 5.6

    I upgraded my Perl version and tried to install the module. Everything was going fine until It gives me the error -- "Error: Unable to locate installed Perl libraries or Perl source code." and the explanation "You get this message, because MakeMaker could not find "C:\p4view\Apps\Gecko\MS I\data\ActivePerl\Perl\lib\CORE\perl.h""

    I wonder why it asks for that file, happen to know what it is?

      You seem to have a binary-only distribution, and you're trying to use a C compiler to install modules from CPAN. (I would guess you're using the standard "perl -MCPAN -e shell" idiom.) This would be the method under a Unix-like operating system with a readily available C compiler, but not under Win32 with a binary distribution.

      With ActiveState, you have a ppm utility. You can get more information about PPM here, but if you're familiar with the CPAN module it works nearly the same way. You should be able to install your printer module easily then.

      Hope this helps.

Re: Printing in ActivePerl 5.6.1 under Windows
by antioch (Sexton) on Jun 17, 2004 at 17:11 UTC
    Ack, I got PPM working and ran the install Win32-Printer command and it said that it had finished installing it, I even ran it again to make sure (It gave me the message 'Win32-Printer already installed'). But Perl doesnt recognize it and its not anywhere in the Perl Win32 folder. Hmm.. I then tried to just copy 'Printer.pm' into the correct folder but that just gave me the error message:

    "Can't locate loadable object for module Win32::Printer in @INC (@INC contains: C :/Perl/lib C:/Perl/site/lib .) at test.pl line 1"

    Bleh, trying to get this module working is killing me X_x