File: document-double-shebang.diff

package info (click to toggle)
eperl 2.2.14-23
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 2,320 kB
  • sloc: ansic: 4,692; perl: 584; sh: 556; makefile: 359
file content (28 lines) | stat: -rw-r--r-- 971 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Fixes missing hint about how to produce a shebang line in eperl output.
(Closes: #360790)

Index: eperl/eperl.pod
===================================================================
--- eperl.orig/eperl.pod	2010-06-06 00:58:47.000000000 +0200
+++ eperl/eperl.pod	2010-06-06 01:02:45.000000000 +0200
@@ -321,6 +321,20 @@
   EOS
   ...
 
+If you need to generate shell or other scripts with ePerl, i.e. you
+need a shebang line in the output of eperl, you have to add a shebang
+line containing e.g. "#!/usr/bin/eperl" first, because eperl will
+strip the first line from the input if it is a shebang line. Example:
+
+  #!/usr/bin/eperl
+  #!/bin/sh
+  echo <: print "quux"; :>
+
+will result in the following output:
+
+  #!/bin/sh
+  echo quux
+
 And finally you can use ePerl directly from within Perl programs by the use of
 the Parse::ePerl(3) package (assuming that you have installed this also; see
 file F<INSTALL> inside the ePerl distribution for more details):