cPanel Perl modules and elements to learn
1. Core Perl (mandatory)
- Scalars, arrays, hashes
- References
- Subroutines
strict, warnings
- Context (scalar vs list)
@ARGV, %ENV
2. Object-Oriented Perl
bless, constructors
- Inheritance (
parent, @ISA, mro)
- Method dispatch
- Lightweight OO patterns (not Moose-heavy)
3. Module & Runtime System
use, require, Exporter
%INC
Module::Load, Module::Runtime
- Versioning (
version)
4. CLI & UX (very common in cPanel)
Getopt::Long, Getopt::Std
Pod::Usage
- Positional args
- Exit codes
5. Filesystem & OS Interaction
open, sysopen
File::* (Path, Temp, Find, Copy)
stat, permissions
IPC::*, system, backticks
/proc usage
6. Error Handling & Safety
die, warn, Carp
eval {} / $@
Try::Tiny
autodie
- Taint mode
-T
7. Regex & Text Processing (critical)
- Heavy regex usage
Text::*, Regexp::Common
- Parsing configs, logs, output
8. Data Serialization & Debugging
Data::Dumper
Storable
JSON, JSON::PP, JSON::XS
YAML
- Debug helpers (
Devel::*)
9. Networking & HTTP
LWP, HTTP::*
Net::*, IO::Socket::*
Net::Ping
- SSL stack (
IO::Socket::SSL, Net::SSLeay)
- APIs, local services
10. Databases & Storage
DBI
- DBM files (
DB_File, GDBM_File, NDBM_File)
- Lightweight persistence
11. Localization & Encoding
Locale::Maketext
- UTF-8 handling
Encode, Unicode::*
- IMAP/charset quirks
12. Time & System Info
Time::Piece, Time::HiRes
Sys::* (mem, hostname, process)
- Cron-friendly patterns
13. Concurrency (used sparingly)
threads
Thread::Queue
- Shared data pitfalls
Test::*
Test::Simple, Test::Harness
- Mocking basics
15. Packaging & Legacy Reality
- RPM-shipped core modules
- Older idioms
- Globals, large files, side effects
- Minimal abstraction