Skip to content
Snippets Groups Projects
  1. May 14, 2017
    • Kamil Rytarowski's avatar
      scripts: Switch to more portable Perl shebang · cb77f0d6
      Kamil Rytarowski authored
      
      The default NetBSD package manager is pkgsrc and it installs Perl
      along other third party programs under custom and configurable prefix.
      The default prefix for binary prebuilt packages is /usr/pkg, and the
      Perl executable lands in /usr/pkg/bin/perl.
      
      This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
      the most portable solution that should work for almost everybody.
      Perl's executable is detected automatically.
      
      This change switches -w option passed to the executable with more
      modern "use warnings;" approach. There is no functional change to the
      default behavior.
      
      While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).
      
      Signed-off-by: default avatarKamil Rytarowski <n54@gmx.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      cb77f0d6
  2. Mar 23, 2010
    • Stephen Hemminger's avatar
      headerdep: perlcritic warning · 1dcd8100
      Stephen Hemminger authored
      
      Minor perlcritic warning:
      headerdep.pl: "return" statement with explicit "undef" at line 84, column 2.  See page 199 of PBP.  (Severity: 5)
      
      The rationale according to PBP is that an explicit return of undef
      (contrary to most people's expectations) doesn't
      always evaluate as false. It has to with the fact that perl return value
      depends on context the function is called. If function is used in
      list context, the appropriate return value for false is an empty list;
      whereas in scalar context the return value for false is undefined.
      By just using a "return" both cases are handled.
      
      In the context of a trivial script this doesn't matter. But one script
      may be cut-paste into later code (most people like me only know 50%
      of perl), that is why perlcritic always complains
      
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      1dcd8100
  3. Apr 11, 2009
  4. Dec 18, 2008
Loading