Here's the basic changes - I'm taking advantage of the, "Best" module -
this module will allow Mailhide.pm to only need a one line change and
the Makefile to just need one more (Pure Perl) dependency:
[snip]
diff -ru Captcha-reCAPTCHA-Mailhide-0.93/Makefile.PL
Captcha-reCAPTCHA-Mailhide-0.93-new/Makefile.PL
--- Captcha-reCAPTCHA-Mailhide-0.93/Makefile.PL 2007-11-19
06:54:46.000000000 -0700
+++ Captcha-reCAPTCHA-Mailhide-0.93-new/Makefile.PL 2007-12-27
11:09:39.000000000 -0700
@@ -17,6 +17,7 @@
'Crypt::Rijndael' => 0,
'MIME::Base64' => 0,
'HTML::Tiny' => '0.904',
+ 'Best' => '0.11',
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Captcha-reCAPTCHA-Mailhide-*' },
Only in Captcha-reCAPTCHA-Mailhide-0.93-new/lib: .DS_Store
Only in Captcha-reCAPTCHA-Mailhide-0.93-new/lib/Captcha: .DS_Store
diff -ru
Captcha-reCAPTCHA-Mailhide-0.93/lib/Captcha/reCAPTCHA/Mailhide.pm
Captcha-reCAPTCHA-Mailhide-0.93-new/lib/Captcha/reCAPTCHA/Mailhide.pm
--- Captcha-reCAPTCHA-Mailhide-0.93/lib/Captcha/reCAPTCHA/Mailhide.pm
2007-11-19 07:06:51.000000000 -0700
+++
Captcha-reCAPTCHA-Mailhide-0.93-new/lib/Captcha/reCAPTCHA/Mailhide.pm
2007-12-27 10:41:42.000000000 -0700
@@ -3,7 +3,7 @@
use warnings;
use strict;
use Carp;
-use Crypt::Rijndael;
+use Best qw/Crypt::Rijndael Crypt::Rijndael_PP/;
use MIME::Base64;
use HTML::Tiny;
@@ -229,9 +229,10 @@
=head1 DEPENDENCIES
-Crypt::Rijndael,
+Crypt::Rijndael or Crypt::Rijndael_PP (Crypt::Rijndael being preferable),
MIME::Base64,
-HTML::Tiny
+HTML::Tiny,
+Best
=head1 INCOMPATIBILITIES
[/snip]
I'm kind of wondering *what* exactly else to put in the Makefile.PL -
The idea of falling back on Crypt::Rijndael_PP is to be able to install
Mailhide without CPAN, or support for a c compiler. We can do something
like version.pm:
http://search.cpan.org/src/JPEACOCK/version-0.74/Makefile.PL
where a --pure_perl flag can be set to Makefile.pm to explicitly install
the Pure Perl stuff,
and then have the PREREQ_PM look something like this:
PREREQ_PM => {
'Test::More' => 0,
'MIME::Base64' => 0,
'HTML::Tiny' => '0.904',
'Best' => '0.11',
(
($no_xs == 1)
?
('Crypt::Rijndael_PP' => 0,)
:
('Crypt::Rijndael' => 0,)
)
},
which I guess is a personal decision. If you're into that idea, I can
give it a test and make sure it works.
On Thu Dec 20 07:39:29 2007, ANDYA wrote:
Show quoted text> On Wed Dec 19 23:38:26 2007, JJSIMONI wrote:
> > It would be really wonderful to have support for Crypt::Rijndael_PP,
> so
> > someone could install Captcha-reCAPTCHA-Mailhide without needing
> access
> > to a compiler - Crypt::Rijndael is currently an XS module.
> >
> > I'll be happy to raise my hand in hacking it together, if you'd be
> > interested in taking my diffs. My interest is in including the
> Mailhide
> > functionality in Dada Mail, "out of the box", since a great majority
> of
> > my users aren't familiar with cpan.
> >
> > It may be as easy as using:
> >
> >
http://search.cpan.org/~gaal/Best-0.11/
> >
> > or just wrapping a, "require" in an eval statement and switching to
> the
> > PP version if it fails.
> >
> > Again - willing to try it out, run the tests and give you some
> diffs.
> >
> > Lemme know ;)
>
> That sounds like a good plan :)
>
> Makefile.PL would have to handle the optional deps too.
>
> If you have time to look at it that'd be most helpful - my head's
> going to be full until after
> christmas now.
>
>
>