View | Details | Raw Unified | Return to bug 37245
Collapse All | Expand All

(-)a/Koha/Localization.pm (+1 lines)
Lines 18-23 package Koha::Localization; Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Koha::Database;
20
use Koha::Database;
21
use Koha::Caches;
21
22
22
use base qw(Koha::Object);
23
use base qw(Koha::Object);
23
24
(-)a/Koha/MarcOverlayRules.pm (-1 / +2 lines)
Lines 17-25 package Koha::MarcOverlayRules; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use List::Util qw(first);
19
use List::Util qw(first);
20
use Koha::MarcOverlayRule;
21
use Carp;
20
use Carp;
22
21
22
use Koha::Caches;
23
use Koha::MarcOverlayRule;
23
use Koha::Exceptions::MarcOverlayRule;
24
use Koha::Exceptions::MarcOverlayRule;
24
use Try::Tiny;
25
use Try::Tiny;
25
use Scalar::Util qw(looks_like_number);
26
use Scalar::Util qw(looks_like_number);
(-)a/xt/perl-check.t (-1 / +40 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
use Modern::Perl;
4
use sigtrap qw/die normal-signals/;
5
6
use Cwd qw(realpath);
7
use File::Basename;
8
use File::Find;
9
use File::Spec;
10
use FindBin;
11
use Test::More;
12
13
my $root = realpath("$FindBin::RealBin/..");
14
15
my @filepaths;
16
sub wanted {
17
    my $filepath = $File::Find::name;
18
    if ($filepath =~ /\.(pm|pl)$/) {
19
        push @filepaths, $filepath;
20
    }
21
}
22
23
find( { wanted => \&wanted, no_chdir => 1 }, $root );
24
25
plan tests => scalar @filepaths;
26
27
foreach my $filepath (@filepaths) {
28
    my $rel_path = File::Spec->abs2rel($filepath, $root);
29
    my $cmd = sprintf('perl -c "%s" 2>&1', $filepath);
30
31
    # FIXME It's the only file that requires a specific @INC
32
    # We should move misc/translator/*.pm to Koha namespace
33
    if ($rel_path eq 'misc/translator/TmplTokenizer.pm') {
34
        my $inc = dirname($filepath);
35
        $cmd = sprintf('perl -I "%s" -c "%s" 2>&1', $inc, $filepath);
36
    }
37
38
    my $output = `$cmd`;
39
    like($output, qr/syntax OK/, $rel_path);
40
}

Return to bug 37245