Instead of hardcoding the location of perl (assuming it is installed in
/usr), use /usr/bin/env to run it, and thus picking it from $PATH.
This makes it possible to run these scripts also on installations with
perl in a different prefix than /usr.

Also, given that we want enable warnings on scripts, turn the -w
previously in shebang to explicit "use warnings;" in scripts which
didn't have it before.

Signed-off-by: Pino Toscano <ptosc...@redhat.com>
---
 libvirt/generator.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libvirt/generator.pl b/libvirt/generator.pl
index 490ef9a..e850500 100755
--- a/libvirt/generator.pl
+++ b/libvirt/generator.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # OCaml bindings for libvirt.
 # (C) Copyright 2007-2015 Richard W.M. Jones, Red Hat Inc.
@@ -26,6 +26,7 @@
 # Please read libvirt/README.
 
 use strict;
+use warnings;
 
 #----------------------------------------------------------------------
 
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to