Skip to content

Perl developer guide

Pavel Serikov edited this page Mar 21, 2018 · 16 revisions

Learn Perl in about 2 hours 30 minutes - http://qntm.org/files/perl/perl.html

General guidelines

http://perldoc.perl.org/index-tutorials.html

http://perldoc.perl.org/index-faq.html

https://www.reg.ru/coding_standards

OOP

https://metacpan.org/pod/distribution/perl/pod/perlootut.pod RUS

https://metacpan.org/pod/distribution/perl/pod/perlobj.pod

https://perlmaven.com/oop-with-moo

https://metacpan.org/pod/distribution/Moose/lib/Moose/Cookbook.pod

https://metacpan.org/pod/distribution/Moose/lib/Moose/Manual/Attributes.pod

Style

https://metacpan.org/pod/distribution/perl/pod/perlstyle.pod

https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy

Mojolicious

https://habrahabr.ru/post/233991/

Module naming conventions

https://pause.perl.org/pause/query?ACTION=pause_namingmodules

Special variables

The @ISA array contains a list of that class's parent classes, if any

Other good learning resources

https://www.youtube.com/user/gabor529/videos

http://modernperlbooks.com/books/modern_perl_2016/07-object-oriented-perl.html

IDE recommendations

Run tests before commit

prove -l -r

Generate cpanfile automatically

sudo cpanm App::scan_prereqs_cpanfile

then run scan-prereqs-cpanfile

scan-prereqs-cpanfile > cpanfile
sudo cpanm --installdeps .

Useful perl modules for debug

Data::Dumper

E.g. you can STDOUT all input parameters of particular method:

sub list {
	my ($calendar, $span) = @_;
	warn "".(caller(0))[3]."() : ".Dumper \@_; # return a list, $calendar - first element, $span - second

Class::Inspector