philippe_44 wrote:
> There is no requirement for 0.30, it's just the one you get by default
> when using CPAN. You're right, I'll have to get the .pm files lower in
> the tree, but that means they'll be duplicated many times - that's not
> great either. I'll check again if there is way I can detect what's
> installed in system Perl first.
I don't see much alternative to the element of duplication in the tree,
because in reality you are providing several alternative trees. You
should be able to de-duplicate the pure perl and Autoloader bits by
placing immediately under the perl version directory. That said, I don't
really remember what LMS puts into @INC.
That resolved, perhaps a simple approach might be something like the
following in 'initPlugin', in place of 'use Crypt::OpenSSL::RSA' and
seeding '$rsa' in the main body.
Code:
--------------------
sub initPlugin {
my $class = shift;
# Required modules that we distribute for some platforms. Log an
# informative message and fail the plugin if we fail to load.
eval {require Crypt::OpenSSL::RSA};
if ($@) {
$log->error("Failed to load perl module Crypt::OpenSSL::RSA, which this
plugin requires. " .
"You probably need to install it on your system. Perl's
error message follows:");
$log->error($@);
return 0;
}
$rsa = Crypt::OpenSSL::RSA->new_private_key( $airport_pem )
|| do { $log->error( "RSA private key import failed" ); return 0; };
etc.
--------------------
Good luck !
------------------------------------------------------------------------
mrw's Profile: http://forums.slimdevices.com/member.php?userid=38299
View this thread: http://forums.slimdevices.com/showthread.php?t=106289
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins