On 15 Feb 2009, at 13:01, Landry Le Chevanton wrote:
I did also had problems with perl scripts after installing the
security
patch. Strategy for fixing has been worked out and reported here:
http://bulknews.typepad.com/blog/2009/02/mac-os-x-security-update-2009001-br
eaks-perl-cpan.html
As well as in Apple forum
http://discussions.apple.com/thread.jspa?threadID=1905157&tstart=0
Thank you very much for these links, which confirmed it was the
security patch which was the cause of the problem and gave a good
start on how to go about fixing the matter.
This recipe worked for me so far.
I reinstalled IO-1.2301 and Compress-Zlib but this did not restore
functionality to PDF::API2.
Running one of the 'example scripts' provided in the documentation for
Zlib.pm resulted in an error involving 'dualval' which turned out to
be a subroutine in Scalar::Utils which is 'use'd by Zlib.pm.
Reinstalling Scalar-List-Utils-1.19 fixed that problem and also
(thankfully) restored PDF::API2.
I am not sure what happened to Scalar::Utils when the security patch
was applied but I have a suspicion it might have been deleted?
Whilst these measures have fixed my immediate problems with Perl I
fear we may yet see some more bugs emerging from the woodwork as
time goes on.
I am most grateful for your help,
Kind regards,
Alan
Landry
Le 15/02/09 12:10, « Alan Fry » <a...@afco.demon.co.uk> a écrit :
I have an Intel MacPro running Mac OS X 10.5.6 (Perl 5.8.8) and a
copy
of PDF::API2. This has worked flawlessly for a long time.
Suddenly it has failed. There have been no changes at all to the
machine apart from a recent 'Security Update', which I think had to
do
mostly with a loophole in Safari.
This minimal script:
my $pdf_in = PDF::API2->open($file_in) or die "$!\n";
my $pdf_out = PDF::API2->new or die "$!\n";
$page = $pdf_out->page;
$page->mediabox(595, 842);
$gfx = $page->gfx;
#$xo = $pdf_out->importPageIntoForm($pdf_in, 1);
#$gfx->formimage($xo, 0, 0, 1);
fails with the error message:
Undefined subroutine &Compress::Zlib::compress called at /Library/
Perl/
5.8.8/PDF/API2/Content.pm line 103.
However the folder 'Compress' is there, (alongside the folder
'PDF"which contains the module), the file 'Zlib' in that folder, and
Zlib has a subroutine named 'compress'. So what can possibly have
gone
wrong here?
If the last two lines above are uncommented, the error message
becomes:
Can't call method "infilt" on an undefined value at /Library/Perl/
5.8.8/PDF/API2/Util.pm line 667.
presumably as a result of failure to access Zlib subroutines?
I have run 'repair permissions' which has not altered the situation
and run out of ideas of what to do next.
I would be most grateful if anyone could help.
Alan Fry