From: Chad on
The question stems from an IRSSI irc client scripting tutorial site
found at the following URL...

http://juerd.nl/site.plp/irssiscripttut

"Because Irssi scripts are embedded in Irssi and not executed from the
console, they do not need to be executable. A permission mode setting
of 600 is enough for scripts in your home directory, 644 is enough for
system wide script installations. The shebang line is not required, as
this is only the case for executable scripts. "

How can a script actually run if it isn't executable?
From: Kenny McCormack on
In article <0e0440e7-821a-4949-91b0-6930159e5c36(a)k1g2000prl.googlegroups.com>,
Chad <cdalten(a)gmail.com> wrote:
>The question stems from an IRSSI irc client scripting tutorial site
>found at the following URL...
>
>http://juerd.nl/site.plp/irssiscripttut
>
>"Because Irssi scripts are embedded in Irssi and not executed from the
>console, they do not need to be executable. A permission mode setting
>of 600 is enough for scripts in your home directory, 644 is enough for
>system wide script installations. The shebang line is not required, as
>this is only the case for executable scripts. "
>
>How can a script actually run if it isn't executable?

Many possibilities. The most straightforward is if it is executed as:

perl yourscript.pl

--
"We should always be disposed to believe that which appears to us to be
white is really black, if the hierarchy of the church so decides."

- Saint Ignatius Loyola (1491-1556) Founder of the Jesuit Order -

From: Ben Morrow on
[f'ups set to clpmisc]

Quoth Chad <cdalten(a)gmail.com>:
> The question stems from an IRSSI irc client scripting tutorial site
> found at the following URL...
>
> http://juerd.nl/site.plp/irssiscripttut
>
> "Because Irssi scripts are embedded in Irssi and not executed from the
> console, they do not need to be executable. A permission mode setting
> of 600 is enough for scripts in your home directory, 644 is enough for
> system wide script installations. The shebang line is not required, as
> this is only the case for executable scripts. "
>
> How can a script actually run if it isn't executable?

You can run any script you can read with

% perl script

Perl doesn't check if the script is executable or not. Irssi does
something similar, except it passes the script to its embedded perl
interpreter rather than executing /usr/bin/perl.

The *only* time a script needs to be executable is when it has a #! line
and you want to invoke it as

% script

or

% ./script

rather than explicitly invoking perl.

Ben

From: Daniel Molina Wegener on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On S�b 10 Jul 2010 20:07,
Chad wrote:

> The question stems from an IRSSI irc client scripting tutorial site
> found at the following URL...
>
> http://juerd.nl/site.plp/irssiscripttut
>
> "Because Irssi scripts are embedded in Irssi and not executed from the
> console, they do not need to be executable. A permission mode setting
> of 600 is enough for scripts in your home directory, 644 is enough for
> system wide script installations. The shebang line is not required, as
> this is only the case for executable scripts. "
>
> How can a script actually run if it isn't executable?

As many dynamic languages today, Perl is an embedable language, so
you can examine your perl documentation using:

$ perldoc perlembed

And take wider look on how to embed Perl into other applications,
such as Irssi. In other words, Perl and other dynamic languages, can
be embeded as a component of your application.

Best regards,
- --
Daniel Molina Wegener <dmw [at] coder [dot] cl>
System Programmer & Web Developer
Phone: +56 (2) 979-0277 | Blog: http://coder.cl/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCgAGBQJMObwRAAoJEHxqfq6Y4O5NCmoQAJcSju4uP78cXtrH5rHjMd1x
ifqIIUtsaOq4DW8lzEohEeLAqsuRPLZ2edUUaTR69O5AhiG3ImB0wZIbVLN60wKm
C9Er1pLJKPNo4nZhylQJrMkRIbmG+lv4dDbAf4Hs6o0X/ilc7cYUiSqDbktHVjRZ
/ZY6tqkZOMxgzZBDun0N/STLZY2Cww9mnUNM0ViSMj7v/H6bopWVM0neBG0GxaVQ
ouDbEAdb5eK7LItgvHE8+QEPjp6OMyTmuyldtEWCmmSKvoI2ErHrrhfa7A5vF+ZD
E7kO+29jfgtPe+NzddN+qOC7tFUu/+9kYI0E5RJ/cq6kGmWxa+TAiChquApNhNPL
z56DMdxNxfhiji2GP7av5y9Ei1Y8UHv/2yPCA41wnSuxPIpW4Zy3Q95ZWMf3d6ny
f1dQKhTWtEnM8rlTGjXoRnYcJzc8H+BdBVEll5I670zdPm9qxBy1EBsaBtB3kC7i
nj9PXOUlAoyBRS81fbsgqztFv1+zp5I4LeVHqAuaIItNylIA2i/vP+k3Oq3LJmTP
A8rulvdj+zycbDj6zhu3xGVkKcamnAdMqv3jUmhmzL5MzXVPdyZMPxMZS6OOebWu
8jALGR6F/hYJC0eHDGxCUZlARiSYQMEZGmfUQDxwOF/Afhbs+b4X1Nujsdbe8WKv
hX176R7RJWZ6UzWmHNgb
=9Ct2
-----END PGP SIGNATURE-----