LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pl2pm

Convert Perl4 libraries to Perl5 modules

TLDR

Convert Perl4 library to module
$ pl2pm [library.pl] > [Module.pm]
copy
Convert multiple files
$ pl2pm [lib1.pl] [lib2.pl]
copy

SYNOPSIS

pl2pm [file...]

DESCRIPTION

pl2pm converts Perl 4 library files (.pl) to Perl 5 module format (.pm). It performs basic syntactic transformations such as adding package declarations, converting require statements, and updating subroutine definitions to follow Perl 5 module conventions.Part of the standard Perl distribution, the conversion is approximate and the output typically requires manual review and adjustment to produce fully functional Perl 5 modules.

PARAMETERS

FILE

Perl4 library file(s).
Output goes to stdout.

INSTALL

sudo apt install perl
copy
sudo dnf install perl
copy
sudo pacman -S perl
copy
sudo apk add perl-utils
copy
sudo zypper install perl
copy
brew install perl
copy
nix profile install nixpkgs#perl
copy

CAVEATS

Part of Perl. Basic conversion. Manual review needed.

HISTORY

pl2pm was created for migrating Perl4 code to Perl5 modules.

SEE ALSO

perl(1), h2xs(1)

Copied to clipboard
Kai