Skip Menu |

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 93272
Status: resolved
Priority: 0/
Queue: Imager

People
Owner: Nobody in particular
Requestors: fraserbn [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: (un)load_plugin needs some extra code to handle Android's linker
The tests on t/t60dyntest.t fail because, well, android's linker. Long story short, the linker doesn't handle relative paths like Linux's normal linker would -- it won't check the current directory, for example. The diff below fixes things in Imager.pm instead; I'm not sure if it'd be better to just patch the test itself. diff --git a/Imager.pm b/Imager.pm index 2722019..64e54b0 100644 --- a/Imager.pm +++ b/Imager.pm @@ -520,6 +520,10 @@ END { sub load_plugin { my ($filename)=@_; my $i; + if ($^O eq 'android') { + require File::Spec; + $filename = File::Spec->rel2abs($filename); + } my ($DSO_handle,$str)=DSO_open($filename); if (!defined($DSO_handle)) { $Imager::ERRSTR="Couldn't load plugin '$filename'\n"; return undef; } my %funcs=DSO_funclist($DSO_handle); @@ -543,6 +547,11 @@ sub load_plugin { sub unload_plugin { my ($filename)=@_; + if ($^O eq 'android') { + require File::Spec; + $filename = File::Spec->rel2abs($filename); + } + if (!$DSOs{$filename}) { $ERRSTR="plugin '$filename' not loaded."; return undef; } my ($DSO_handle,$funcref)=@{$DSOs{$filename}}; for(keys %{$funcref}) {
On Sat Feb 22 19:35:59 2014, Hugmeir wrote: Show quoted text
> The tests on t/t60dyntest.t fail because, well, android's linker. Long > story short, the linker doesn't handle relative paths like Linux's > normal linker would -- it won't check the current directory, for > example. > The diff below fixes things in Imager.pm instead; I'm not sure if it'd > be better to just patch the test itself. >
Thanks, applied in Imager 0.99. Tony