sebthebert / Perl_Guidelines

Perl Guidelines for code, documentation and tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Perl Guidelines

Perl Guidelines for code, documentation and tests. WORK IN PROGRESS...

Code Guidelines

File manipulation

Example:

open($fh, '<', 'foo.txt');

It's probably a good idea to use Path::Tiny module to handle file manipulations for bigger programs/scripts.

Documentation Guidelines

You should have at least these 4 POD sections in your module:

  • NAME
  • DESCRIPTION
  • SYNOPSIS
  • AUTHOR

Your module should look like this:

package My::Module;

=head1 NAME

My::Module - Module doing great stuff

=head1 DESCRIPTION

Module doing great stuff and a lot more !

=head1 SYNOPSIS

    use My::Module;

    my $mine = My::Module->new({user => $user, password => $password});

    $mine->something($var);

=cut

...

1;

=head1 AUTHOR

Firstname Lastname <user@somedomain.com>

=cut

Tests Guidelines

About

Perl Guidelines for code, documentation and tests

License:GNU General Public License v3.0