http://qs321.pair.com?node_id=961566


in reply to perl 5.12: 32 bit to 64 bit transition

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
  • Comment on Re: perl 5.12: 32 bit to 64 bit transition

Replies are listed 'Best First'.
Re^2: perl 5.12: 32 bit to 64 bit transition
by sg (Pilgrim) on Mar 26, 2012 at 05:31 UTC

    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?

        Thanks -- the suggestions helped get rid of the warning/error messages. However, there must be some other incompatibility since the code does not work as expected. I'll have to do what I was trying to avoid, viz., having to dig into the code to find out which pieces stop working in the new system. While doing this I'll also look to replacing the unmaintained CPAN modules with others such as NET::POP3_auth, Net::POP3::SSLWrapper, and NET::SMTP_auth.