Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: [emacs] [perl6] how to set mode-compile to respect the shebang

by duelafn (Parson)
on Feb 19, 2016 at 02:15 UTC ( [id://1155605]=note: print w/replies, xml ) Need Help??


in reply to [emacs] [perl6] how to set mode-compile to respect the shebang

I don't know any "proper" ways of doing it, but defining an execbang script isn't too hard. This should work if you set it to your Perl Command:

#!/usr/bin/perl use strict; use warnings; # use #! from first argument which is a file: my ($file) = grep -f $_, @ARGV; # alternative: use #! from last argument: # my $file = $ARGV[-1]; open my $F, "<", $file or die "Error reading $file: $!"; exec $1, @ARGV if <$F> =~ /^#!(\S+)/; exit 1;

Good Day,
    Dean

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1155605]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-03-19 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found