Module::New::File::MainModule - Module::New::File::MainModule documentation


Module-New documentation Contained in the Module-New distribution.

Index


Code Index:

NAME

Top

Module::New::File::MainModule

DESCRIPTION

Top

a template for a main module (lib/Module/Name.pm).

AUTHOR

Top

Kenichi Ishigaki, <ishigaki at cpan.org>

COPYRIGHT AND LICENSE

Top


Module-New documentation Contained in the Module-New distribution.

package Module::New::File::MainModule;

use strict;
use warnings;
use Module::New::File;

file '{MAINFILE}' => content { return <<'EOT';
package <%= $c->module %>;

use strict;
use warnings;

our $VERSION = '0.01';

% if ($c->config('xs')) {
require XSLoader;
XSLoader::load(__PACKAGE__, $VERSION);
% } else {
sub new {
    my $class = shift;
    my $self  = bless {}, $class;

    $self;
}
% }

1;

__END__

=head1 NAME

<%= $c->module %> - 

=head1 SYNOPSIS

    use <%= $c->module %>;
    <%= $c->module %>->new;

=head1 DESCRIPTION

=head1 METHODS

=head2 new

=head1 AUTHOR

<%= $c->config('author') %>, E<lt><%= $c->config('email') %>E<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (C) <%= $c->date->year %> by <%= $c->config('author') %>.

<%= $c->license %>
=cut
EOT
};

1;

__END__