Alister West

home is where your code is ...

Perl Module Template Tips

These are here to remind me.


# Put a standard block at the top of each file and test for it.

# ============================================
#   Copyright (c) 2010  -  Alister West
# ============================================

Version line

# Prefered (note: find link to article on this)

# 'version' pod says to keep this all on one line
use version 0.77; our $VERSION = qv("v0.1");

# Acceptable
our $VERSION = '0.01';

# Not advised
our $VERSION = 0.01;

Return True

Modules just want a true return value at the end.

# Boring    
return 1;

# Better?
return 'Better!';


# Put POD after __END__ 


# Always include NAME and SYNOPSIS blocks as these 
# are useful for pod2usage. 
=head1 NAME



    print My::Module::rocks('the party!');

By Alister West