Re: [mod_perl2] ImageMagick 'convert'
> SB> Your case still includes things that I don't have, references to someYou can always inline image using uuencoded or similar ascii friendly encoding.
> SB> images... can you trim it down to something that can be used as is? it'd be
> SB> nice to add this test to mp2 test suite. Some heavy apps are good for testing.
> I'm afraid I can't trim it down to exclude the images, as
> this is an image-based test. But any image will do, and I've
> tried to make it easy by putting the paths in obvious variables at the top.
cat /usr/share/doc/perl-IO-stringy-2.108/icons/itembullet.gif | perl -0777 -e
'print pack("u", <>)' | perl -0777 -e 'print unpack "u", <>' > out.gif
so you convert the binary image into a uuencoded string:
$ cat foo.gif | perl -0777 -e 'print pack("u", <>)'
(-0777 is the same as 'local $/' to slurp the whole thing in)
Now you inline this uuencoded string into a variable in your test and convert
it to the binary format at run time:
$uuencoded = <<EOUU;
$binary = unpack("u", $uuencoded);
then you can send this image as if it was a file on the disk.
> SB> Also you don't say anything about your perl build specifics, neither youperl -V is not enough, I ask people to follow the guidelines for a reason :)
> Beg pardon: now attached to the end of this mail.
also the next version of mp2 will sport mp2bug script (it's in cvs already).
> SB> mention which ImageMagic lib version do you use and which I::M Perl lib youDunno if I get to build it. May be tomorrow. Meanwhile a self-containing test
> SB> have the trouble with. See:
> SB> http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
> The very latest: 556 Q16, the official Windows distribution. Whilst
> this IM builds fine, I can't get PerlMagick to build (didn't try very
> hard) so can't say if it's okay with Q8. I do know that it's fine with
> Apache/mp 1, but then the problem only seems to be with multiple
> synchronous requests. Debug is not enabled on the official release.
would be cool.
> SB> May be we will have a better luck, with Filter::CBC as it doesn't rely on anyIs it hard to write a short test? I haven't used Filter::CBC yet. So I won't
> SB> external libs (I think).
> Filter::CBC is okay with TwoFish, it's the default Rj that messes it
have to mess with the magic install.
> Also - in the logs quoted in that previous mail, there's anprobably complaining about:
> interesting warning about v-string not being portable...?
our $VERSION = 0.1;
does it help to use "0.1"?
> Thanks for your help and interest, Stas. If I ever get this thingCool!
> working and earning money, there'll defiantly be donations to the
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@... http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com