Package: debhelper
Version: 9.20150811
Severity: minor

debhelper manpage includes this example of how to embed #DEBHELPER# in Perl code:

   my $temp="set -e\nset -- @ARGV\n" . << 'EOF';
   #DEBHELPER#
   EOF
   system ($temp) / 256 == 0
         or die "Problem with debhelper scripts: $!";

The division by 256 is useless. But more importantly, it will almost always give you incorrect error message if the embedded script fails. This is because system() does not set $! if the program exits normally with non-zero exit status.

--
Jakub Wilk

Reply via email to