Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

perl 5.12: 32 bit to 64 bit transition

by sg (Pilgrim)
on Mar 25, 2012 at 18:53 UTC ( [id://961516]=perlquestion: print w/replies, xml ) Need Help??

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

Hello,

I have code that has been working properly for years on perl 5.12 (and prior versions) -- but 32 bit version on 32 bit Windows XP.

I would like to use them with perl 5.12 64 bit on 64 bit Windows 7, but am unable to find the suitable replacements for some modules, such as:

Net/POP3/SSL.pm IO/Socket/SSL.pm Net/SSLeay.pm Net/SMTP/SSL.pm

I am not even sure if the sources for the above can be built for 64 bit Windows 7 -- in which case my perl sources would need to be re-written to use a different set of packages (assuming suitable replacement packages exist).

Any advice? (I am OK with jumping from 5.12 32 bit to 5.14 64 bit, skipping 5.12 64 bit, if that would help.)

PS: the code that has worked for years and continues to work on 32 bit systems is the vim based mail suite here.

Thanks,

--sg

Replies are listed 'Best First'.
Re: perl 5.12: 32 bit to 64 bit transition
by syphilis (Archbishop) on Mar 26, 2012 at 01:05 UTC
    You can get ppm packlages for IO::Socket::SSL and Net::SSLeay from the sisyphusion repo.
    Net::SMTP::SSL is pure perl (but I'll stick a ppm package on the sisyphusion repo anyway), and I couldn't quickly find Net::POP3::SSL on CPAN.
    Did you mean Net::POP3::SSLWrapper ? (If so, it also is pure perl, but could also be added to the sisyphusion repo.)

    Update: Added Net::SMTP::SSL and Net::POP3::SSLWrapper to sisyphusion repo.

    Cheers,
    Rob

      Thanks -- progress, but one more step remains. Here's the contents of Net::POP3::SSL -- as syphilis also found out, this no longer exists in CPAN, and so I copied it form my 32 bit machine to "<perl64>/site/lib/Net/POP3/SSL.pm":

      package Net::POP3::SSL; # SSL.pm, v 1.0 2007/09/06 use strict; use vars qw[$VERSION @ISA]; $VERSION = sprintf "%d.%02d", split m/\./, (qw$Revision: 1.0 $)[1]; use IO::Socket::SSL; # qw( debug4 ); use Net::POP3; @ISA = ( 'IO::Socket::SSL', grep { $_ ne 'IO::Socket::INET' } @Net::POP3::ISA ); no strict 'refs'; foreach ( keys %Net::POP3:: ) { next unless defined *{$Net::POP3::{$_}}{CODE}; *{$_} = \&{"Net::POP3::$_"}; } 1; __END__ =head1 NAME Net::POP3::SSL - SSL support for Net::POP3 =head1 SYNOPSIS use Net::POP3::SSL; my $pops = Net::POP3::SSL->new("example.com", Port => 995); =head1 DESCRIPTION Implements the same API as L<Net::POP3|Net::POP3>, but uses L<IO::Socket::SSL|IO::Socket::SSL> for its network operations. Due to the nature of C<Net::POP3>'s C<new> method, it is not overridden to ma +ke use of a default port for the POP3S service. Perhaps future versions will be smart like that. Port C<995> is usually what you want, and it' +s not a pain to specify that. For interface documentation, please see L<Net::POP3|Net::POP3>. =head1 SEE ALSO L<Net::POP3>, L<IO::Socket::SSL>, L<perl>. =head1 AUTHOR Casey West, <F<casey@geeknest.com>>. =head1 COPYRIGHT Copyright (c) 2004 Casey West. All rights reserved. This module is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. =cut

      While I get no complaints from 32 bit perl 5.8, the 64 bit perl 5.12 complains:

      Not a GLOB reference at C:/opt/perl64/site/lib/Net/POP3/SSL.pm line 16 +.

      So why the complaint from the newer, 64 bit perl?

        this no longer exists in CPAN

        I can't even find it on backpan - which makes me wonder whether it was *ever* on cpan.

        So why the complaint from the newer, 64 bit perl?

        Because it's newer, not because it's 64-bit. Beginning with perl-5.10, that particular construct is interpreted as a glob reference, whereas it's actually imeant to be a code reference (which is how 5.8 interprets it).
        I don't know exactly what needs to be done there - though I'm quite sure that someone here will.

        Have you considered trying Net::POP3::SSLWrapper (which is newer, and might even be currently maintained) ?

        Cheers,
        Rob

        package fred; sub fred{ print 'Fred says hi' } package main;; fred::fred;; Fred says hi print defined *{$fred::fred}{CODE};; [Can't use an undefined value as a symbol reference at (eval 21) line +1 print defined *{fred::fred}{CODE};; Ambiguous use of *{fred::fred} resolved to *fred::fred at (eval 19) li +ne 1, 1 print defined *{fred::bill}{CODE};; *{$_} = \&{"fred::$_"} for 'fred';; fred();; Fred says hi

        In a nutshell, dropping the $ from next unless defined *{$Net::POP3::{$_}}{CODE};

        To give next unless defined *{Net::POP3::{$_}}{CODE}; should work.

        Though that would still issue a warning, so try:next unless defined *{"Net::POP3::$_"}{CODE};.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?

Re: perl 5.12: 32 bit to 64 bit transition
by bms (Monk) on Mar 25, 2012 at 19:10 UTC
    From what I remember, dmake was the solution. Seen here. I recommend looking through the ActiveState forums if that doesn't work. They are much more likely to have your specific answer.
Re: perl 5.12: 32 bit to 64 bit transition
by Anonymous Monk on Mar 25, 2012 at 19:10 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-19 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found