No-install Perl Interpretor

M

Micla

Would anybody know a Perl version usable without any prior installation?

One of the goals foreseen for it would be to have some "personal"
scripts on a USB memory key, immediately usable on any computer that I
have the opportunity to go on.

But there are also other reasons to try to use Perl scripts without
installing Perl previously.

Thank's for any help.

Me.
 
M

Micla

Well, thank's for this reply, verification made, I had caugth tinyPerl
already.

Of course using a compiler answers to the goal that I have given as an
example, but this doesnt give me the ease of use of a no-install
interpretopr of Perl. If I want to modify a script "on the fly", or type
a command not planned before, an uninstalled interpretor allows it !

So, if there is a possibility to run a perl interpretor without prior
install, I remain strongly interested !

Thank's.

Micla.


Jack Challen a écrit :
 
B

Ben Morrow

[don't top-post]

Quoth Micla said:
Jack Challen a écrit :

Well, thank's for this reply, verification made, I had caugth tinyPerl
already.

Of course using a compiler answers to the goal that I have given as an
example, but this doesnt give me the ease of use of a no-install
interpretopr of Perl. If I want to modify a script "on the fly", or type
a command not planned before, an uninstalled interpretor allows it !

So, if there is a possibility to run a perl interpretor without prior
install, I remain strongly interested !

I don't know about tinyperl, but certainly a bundled PAR executable
contains a full Perl interpreter + modules, and you can choose to bundle
in any modules you like. This means that if you make a PAR of the
script:

#!/usr/bin/perl

do shift

__END__

it will be a stand-alone perl interpreter, not requiring any
installation. Note that this will obviously ignore any switches given
either on the command line or on the #! line: if you need this you will
have to write a short script to do that yourself. Also note that getting
'perl -T' to work will be difficult, if you need it...

Ben
 
M

Micla

Ben Morrow a écrit :
[don't top-post]

Quoth Micla said:
Jack Challen a écrit :


Well, thank's for this reply, verification made, I had caugth tinyPerl
already.

Of course using a compiler answers to the goal that I have given as an
example, but this doesnt give me the ease of use of a no-install
interpretopr of Perl. If I want to modify a script "on the fly", or type
a command not planned before, an uninstalled interpretor allows it !

So, if there is a possibility to run a perl interpretor without prior
install, I remain strongly interested !


I don't know about tinyperl, but certainly a bundled PAR executable
contains a full Perl interpreter + modules, and you can choose to bundle
in any modules you like. This means that if you make a PAR of the
script:

#!/usr/bin/perl

do shift

__END__

it will be a stand-alone perl interpreter, not requiring any
installation. Note that this will obviously ignore any switches given
either on the command line or on the #! line: if you need this you will
have to write a short script to do that yourself. Also note that getting
'perl -T' to work will be difficult, if you need it...

Ben

Well, thank's again ... But what is this "bundled PAR executable", and
where can I get it ? I don't understand all your comment, but I already
fear to have the need of the command-line arguments to pass to the scripts.

Micla.
 
B

Ben Morrow

Quoth Micla said:
Ben Morrow a écrit :


Well, thank's again ... But what is this "bundled PAR executable", and
where can I get it ? I don't understand all your comment, but I already
fear to have the need of the command-line arguments to pass to the scripts.

Install PAR.pm from CPAN. It comes with a program called 'pp' which will
take a script and create a stand-alone executable out of it.

Ben
 
G

Gregory Toomey

Micla said:
Would anybody know a Perl version usable without any prior installation?

One of the goals foreseen for it would be to have some "personal"
scripts on a USB memory key, immediately usable on any computer that I
have the opportunity to go on.

But there are also other reasons to try to use Perl scripts without
installing Perl previously.

Thank's for any help.

Me.

Install an OS ( eg damnsmalllinux about 50MB) with Perl on your usb key
New motherboards support booting from usb.

gtoomey
 
M

Malcolm Dew-Jones

Micla ([email protected]) wrote:

: Would anybody know a Perl version usable without any prior installation?

: One of the goals foreseen for it would be to have some "personal"
: scripts on a USB memory key, immediately usable on any computer that I
: have the opportunity to go on.

: But there are also other reasons to try to use Perl scripts without
: installing Perl previously.

: Thank's for any help.

The keys files required by perl are very few.

On windows, for example, you need perl.exe and perhaps one .DLL file
(perhaps another as well). If you have those files in your path then you
can write and run perl scripts without any kind of install, and without
taking up much space. Of course you can't use modules, unless you also
include them somewhere, but so what, perl by itself is still extremely
useful for things like mass batch editing of files and flexible filtering
etc.
 
R

Richard Williams

Micla ([email protected]) wrote:

: Would anybody know a Perl version usable without any prior installation?

The keys files required by perl are very few.

On windows, for example, you need perl.exe and perhaps one .DLL file
(perhaps another as well). If you have those files in your path then you
can write and run perl scripts without any kind of install, and without
taking up much space. Of course you can't use modules, unless you also
include them somewhere, but so what, perl by itself is still extremely
useful for things like mass batch editing of files and flexible filtering
etc.

Tinyperl extends this approach for Windows by also including a
small library of core modules (compressed as a single file that can be
rebuilt with additional modules if required). The Tinyperl interpreter can
be used in the normal way to run standard scripts, or you can (optionally)
use the package to build standalone executables containing the
interpreter.

Indigoperl may be another option:

http://www.indigostar.com/indigoperl.htm

AFAIR the installation script is optional (or was in older versions) if
you specify the path manually. You should be able to get the whole thing
on a reasonably-sized USB key.

Richard.
 
M

Micla

Micla a écrit :
Would anybody know a Perl version usable without any prior installation?

One of the goals foreseen for it would be to have some "personal"
scripts on a USB memory key, immediately usable on any computer that I
have the opportunity to go on.

But there are also other reasons to try to use Perl scripts without
installing Perl previously.

Thank's for any help.

Me.

Thank's for all these replies !

In fact, the extract of the minimal set of executables from Perl seems
to be the most efficient way to meet my requirement.

I will investigate to determine precisely what are the files needed. If
anybody has the list of them, thank's by advance !

Another point : I have to use my key and my scripts on "office" machines
which are securised and which I cannot reboot or install software on.
That'a also a reason fo me to look after "portable" and "uninstalled"
solutions.

Thank's to the community !

Micla.
 
M

Michele Dondi

Would anybody know a Perl version usable without any prior installation?

One of the goals foreseen for it would be to have some "personal"
scripts on a USB memory key, immediately usable on any computer that I
have the opportunity to go on.

But there are also other reasons to try to use Perl scripts without
installing Perl previously.

IMHO it's unreasonable to think that you won't need at least some of
the core modules. Now one possibility I have been thinking of for
other reasons and with which I would like to make some experiments
anyway is to spot the possibility[1] to put code in @INC to move
*most*[2] of perl lib into, say, a zip archive. Of course this would
be yet another instance of "trading time for space"...



[1] That I recently mentioned in another thread, BTW!
[2] It's obvious that a bunch of modules should remain available in a
physical directory to make the thing work...


Michele
 
M

Michele Dondi

The keys files required by perl are very few.

On windows, for example, you need perl.exe and perhaps one .DLL file
(perhaps another as well). If you have those files in your path then you
can write and run perl scripts without any kind of install, and without
taking up much space. Of course you can't use modules, unless you also
include them somewhere, but so what, perl by itself is still extremely
useful for things like mass batch editing of files and flexible filtering
etc.

Yes, but even if often I come to think that I'm a
reinvent-the-wheel/roll-it-yourself-kinda-guy, thinking of it better I
realize that a consistent ratio of the scripts I write for daily use
relies on some module or another...

Not only, but in some cases perl will silently use some modules even
if appearently it is not so, I can't think of other examples ATM, but
an obvious one is:

perl -MO=Deparse -le 'print for <*>'

that yields

BEGIN { $/ = "\n"; $\ = "\n"; }
use File::Glob ();
foreach $_ (glob('*')) {
print $_;
}


Michele
 
M

Micla

Michele Dondi a écrit :
Would anybody know a Perl version usable without any prior installation?

One of the goals foreseen for it would be to have some "personal"
scripts on a USB memory key, immediately usable on any computer that I
have the opportunity to go on.

But there are also other reasons to try to use Perl scripts without
installing Perl previously.


IMHO it's unreasonable to think that you won't need at least some of
the core modules. Now one possibility I have been thinking of for
other reasons and with which I would like to make some experiments
anyway is to spot the possibility[1] to put code in @INC to move
*most*[2] of perl lib into, say, a zip archive. Of course this would
be yet another instance of "trading time for space"...



[1] That I recently mentioned in another thread, BTW!
[2] It's obvious that a bunch of modules should remain available in a
physical directory to make the thing work...


Michele

Hi Michele,

.... I just write this (n+1)th answer not to let you orphan while I will
be sleeping, since you strangely use precisely these hours to make your
replies ...

My question wasn't to use or not modules, but if necessary how to use
them without any prior "make install" if I have to run my scripts on a
machine on which I have no rights to install anything. So if Perl
modulesare needed, my only question is : how can I do that without any
install ? And in the good example, but not the exclusive case, of a USB
memory key, are there difficulties to put these damned modules on a key?

Thank's to help me (and the remaining part of the planet) solve this
problem definitely ...!!!

:)))

Micla.
 
R

Richard Williams

Michele Dondi said:
IMHO it's unreasonable to think that you won't need at least some of
the core modules. Now one possibility I have been thinking of for
other reasons and with which I would like to make some experiments
anyway is to spot the possibility[1] to put code in @INC to move
*most*[2] of perl lib into, say, a zip archive. Of course this would
be yet another instance of "trading time for space"...
[2] It's obvious that a bunch of modules should remain available in a
physical directory to make the thing work...

Tinyperl for Windows rather cleverly manages to use dozens of modules, yet
the complete distribution is just 3 files (executable, 'PerlLib' as a
..dll, and a zipfile of modules), plus docs. The .dll contains the
Compress::Zlib XS module, which handles unpacking any other required
modules from the zipfile into a temporary directory on the fly. The
unpacked modules are deleted after use.

http://tinyperl.sourceforge.net/

Richard.
 
B

Ben Morrow

Quoth Michele Dondi said:
Would anybody know a Perl version usable without any prior installation?

One of the goals foreseen for it would be to have some "personal"
scripts on a USB memory key, immediately usable on any computer that I
have the opportunity to go on.

But there are also other reasons to try to use Perl scripts without
installing Perl previously.

IMHO it's unreasonable to think that you won't need at least some of
the core modules. Now one possibility I have been thinking of for
other reasons and with which I would like to make some experiments
anyway is to spot the possibility[1] to put code in @INC to move
*most*[2] of perl lib into, say, a zip archive. Of course this would
be yet another instance of "trading time for space"...

[1] That I recently mentioned in another thread, BTW!
[2] It's obvious that a bunch of modules should remain available in a
physical directory to make the thing work...

This is exactly what PAR does. It packs a perl, a script and a whole lot
of modules up into one executable that is able to find and use those
modules.

Ben
 
M

Michele Dondi

the core modules. Now one possibility I have been thinking of for
other reasons and with which I would like to make some experiments
anyway is to spot the possibility[1] to put code in @INC to move
*most*[2] of perl lib into, say, a zip archive. Of course this would
[snip]
Tinyperl for Windows rather cleverly manages to use dozens of modules, yet
the complete distribution is just 3 files (executable, 'PerlLib' as a
.dll, and a zipfile of modules), plus docs. The .dll contains the
Compress::Zlib XS module, which handles unpacking any other required
modules from the zipfile into a temporary directory on the fly. The
unpacked modules are deleted after use.

So probably it does *exactly* what I had in mind, except that I
wouldn't unpack to a temp dir at all...


Michele
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top