PLSH - Perl Shell
plsh [options] [args]
Creates an interactive Perl shell. Startup configuration commands written in Perl syntax can be stored in '.plshrc' file in HOME directory (e.g., $HOME on Linxu, %USERPROFILE% on Windows) which will initialize the Perl Shell on every startup.
$HOME
%USERPROFILE%
-E Exit after -e commands complete. --exit -e Valid Perl to execute. Multiple valid Perl --execute statements (semicolon-separated) and multiple -e allowed. -f Perl feature set to use. Example: ":5.10" --feature DEFAULT: (or not specified) ":default" -I dir Specify directory to prepend @INC. Multiple --Include -I allowed. -l Require "my" for all variables. --lexical Requires Lexical::Persistence, fails if not found. -P package Package to use as namespace. Will: --package use `package'; before any -e arguments. -p prompt Prompt for the shell. --prompt -s file Session command log file. --session -V Output verbose initialization information. --verose
--help Print Options and Arguments. --man Print complete man page. --versions Print Modules, Perl, OS, Program info.
An example '.plshrc' file.
use App::PerlShell::Plugin::Macros; # do not require a semicolon to terminate each line $ENV{PERLSHELL_SEMIOFF}=1; # turn on feature 5.10 (use feature ':5.10';) $ENV{PERLSHELL_FEATURE}=":5.10"; # override the `version` command no warnings 'redefine'; *App::PerlShell::version = sub { print "MyVersion" }
Command line options -f, -p, -P override .'plshrc'.
Prepend any -I paths to @INC.
Set -P package. If provided, set -e to "use <package>".
Add any commmands from '$HOME/.plshrc' file if exists in HOME directory.
Add any commmands from '.plshrc' file if exists in working directory.
Add any additional -e arguments to -e.
If -E, add "exit;" to end of -e.
The following two examples accomplish the same thing.
plsh.pl -e "print join ' ', @ARGV;" -E hello world
C:\> plsh.pl Perl> print "hello world"; Perl> exit;
App::PerlShell
This software is released under the same terms as Perl itself. If you don't know what that means visit http://perl.com/.
Copyright (c) 2015-2022 Michael Vincent
http://www.VinsWorld.com
All rights reserved
To install App::PerlShell, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::PerlShell
CPAN shell
perl -MCPAN -e shell install App::PerlShell
For more information on module installation, please visit the detailed CPAN module installation guide.