https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34088

--- Comment #34 from Jonathan Druart <[email protected]> ---
% more foo.pl
#!/usr/bin/perl

use Modern::Perl;

BEGIN {
    say "exit";
    exit;
};

say "hey!";

On my host, perl v5.34.0
% perl -c foo.pl
exit
foo.pl syntax OK

within ktd noble (perl v5.38.2)
root@kohadevbox:koha$ perl -c foo.pl
exit

The doc states that the begin block will be executed (same in both versions):

-c

    causes Perl to check the syntax of the program and then exit without
executing it. Actually, it will execute any BEGIN, UNITCHECK, or CHECK blocks
and any use statements: these are considered as occurring outside the execution
of your program. INIT and END blocks, however, will be skipped.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to