Item13209: false alarm of corrupt .changes file
Priority: Urgent
Current State: Closed
Released In: 1.2.0
Target Release: minor
Applies To: Engine
Component:
Branches: master
Since the format of the .changes file has been changed to JSON I get the following error message:
Corrupt /var/www.../.changes: Can't locate Win32/Locale.pm in @INC
This is is caused by the mailnotify cronjob ... which nevertheless proceeds properly. The problem stems from
CPAN:JSON defining the
$@
variable after
calling
decode()
... which is a false alarm as the system is running under Linux. Whenever a json file is corrupt
CPAN:JSON will call Carp::croak() and
report the exact position where the error happened.
Above Win32::Locale warning seems to be caused by
CPAN:JSON testing libraries ... at least that's what I presume. So it sets the
$@
variable tested after
calling
decode()
, yet still its value does not matter.
However the following
test_json.pl
does
not show the same behavior.
#!/usr/bin/env perl
use JSON;
my $json = JSON->new->pretty(0);
...
my $data = readFile($file);
$json->decode($data);
print STDERR "woops: $@\n" if $@;
So there is something else setting
$@
... and I dunno what. Package versions:
- JSON-2.90
- JSON::XS-3.10
- JSON:PP-2.27203
Crawford, any idea?
--
MichaelDaum - 13 Jan 2015
Missing eval. The $@ was probably hanging around from the dependency checks.
--
CrawfordCurrie - 15 Jan 2015