use Test::More tests => 3;
BEGIN {
use_ok( 'Acme::HelloWorld', 'greet' ) || print "Bail out!\n";
}
diag( "Testing Acme::HelloWorld $Acme::HelloWorld::VERSION, Perl $], $^X" );
can_ok( 'Acme::HelloWorld', 'greet' );
is( greet(), 'Hello, world!', 'greet() greets the world' );
####
package Acme::HelloWorld;
use 5.006;
use strict;
use warnings;
use parent 'Exporter';
our $VERSION = '0.01';
our ( @EXPORT_OK ) = qw(greet);
sub greet {
return "Hello, world!";
}
=head1 NAME
Acme::HelloWorld - Greet the world in style!
=head1 VERSION
Version 0.01
=head1 SYNOPSIS
This module provides a function that returns a greeting to the world.
use Acme::HelloWorld 'greet';
my $greeting = greet();
=head1 EXPORT
Nothing is exported by default. C will be exported if specified in the export list.
=head1 SUBROUTINES/METHODS
=head2 greet
my $greeting = greet();
print "$greeting\n";
C takes no parameters, and returns the text, 'C'.
=head1 AUTHOR
David Oswald, C<< >>
=head1 BUGS
Please report any bugs or feature requests to C, or through
the web interface at L. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Acme::HelloWorld
You can also look for information at:
=over 4
=item * RT: CPAN's request tracker (report bugs here)
L
=item * AnnoCPAN: Annotated CPAN documentation
L
=item * CPAN Ratings
L
=item * Search CPAN
L
=back
=head1 ACKNOWLEDGEMENTS
I'd like to thank the world for listening when I shout I
=head1 LICENSE AND COPYRIGHT
Copyright 2012 David Oswald.
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
=cut
1; # End of Acme::HelloWorld
##
##
perl Makefile.PL
make
make test
##
##
perl Makefile.PL
make
make test
make distcheck (This confirms that your MANIFEST is complete).
make disttest (This will build the dist in ./Acme-HelloWorld-0.01/)
cp Acme-HelloWorld-0.01/META.json ./META.json
cp Acme-HelloWorld-0.10/META.yml ./META.yml
rm -rf Acme-HelloWorld-0.01/