Skip to content

Commit

Permalink
skeleton for this dist
Browse files Browse the repository at this point in the history
flesh out over the next week or two
  • Loading branch information
leejo committed May 23, 2014
1 parent af766fd commit b0baf5a
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 11 deletions.
14 changes: 14 additions & 0 deletions .gitignore
@@ -0,0 +1,14 @@
/META.yml
/MYMETA.*
/blib/
/inc/
/pm_to_blib
/MANIFEST
/MANIFEST.bak
/Makefile
/Makefile.old
*.old
*.swp
~$
/CGI-Alternatives*tar.gz
.DS_Store
4 changes: 4 additions & 0 deletions Changes
@@ -0,0 +1,4 @@
Revision history for CGI::Alternatives

0.01 Ven 23 mai 2014 19:49:01 CEST
* First release, let's make a start on this
29 changes: 29 additions & 0 deletions Makefile.PL
@@ -0,0 +1,29 @@
#!perl

use strict;
use warnings;

use ExtUtils::MakeMaker;

WriteMakefile(
NAME => 'CGI::Alternatives',
ABSTRACT_FROM => 'lib/CGI/Alternatives.pm',
VERSION_FROM => 'lib/CGI/Alternatives.pm',
AUTHOR => 'Lee Johnson <leejo@cpan.org>',
LICENSE => 'perl',
PREREQ_PM => {
},
BUILD_REQUIRES => {
},
META_MERGE => {
resources => {
license => 'http://dev.perl.org/licenses/',
homepage => 'https://metacpan.org/module/CGI::Alternatives',
bugtracker => 'https://github.com/leejo/cgi-alternatives/issues',
repository => 'https://github.com/leejo/cgi-alternatives',
},
},
test => {
TESTS => 't/*.t',
},
);
11 changes: 11 additions & 0 deletions README
@@ -0,0 +1,11 @@
NAME
CGI::Alternatives - documentation for alternative solutions to CGI.pm

VERSION
0.01

DESCRIPTION
PSGI/Plack
Mojolicious
Dancer
Catalyst
11 changes: 0 additions & 11 deletions README.md

This file was deleted.

27 changes: 27 additions & 0 deletions lib/CGI/Alternatives.pm
@@ -0,0 +1,27 @@
package CGI::Alternatives;

our $VERSION = '0.03';

=head1 NAME
CGI::Alternatives - documentation for alternative solutions to CGI.pm
=head1 VERSION
0.01
=head1 DESCRIPTION
=head1 PSGI/Plack
=head1 Mojolicious
=head1 Dancer
=head1 Catalyst
=cut

1;

# vim: ts=2:sw=2:et
36 changes: 36 additions & 0 deletions t/001_compiles_pod.t
@@ -0,0 +1,36 @@
#!perl

use strict;
use warnings;

use Test::More;
use File::Find;

if(($ENV{HARNESS_PERL_SWITCHES} || '') =~ /Devel::Cover/) {
plan skip_all => 'HARNESS_PERL_SWITCHES =~ /Devel::Cover/';
}
if(!eval 'use Test::Pod; 1') {
*Test::Pod::pod_file_ok = sub { SKIP: { skip "pod_file_ok(@_) (Test::Pod is required)", 1 } };
}
if(!eval 'use Test::Pod::Coverage; 1') {
*Test::Pod::Coverage::pod_coverage_ok = sub { SKIP: { skip "pod_coverage_ok(@_) (Test::Pod::Coverage is required)", 1 } };
}

my @files;

find(
{
wanted => sub { /\.pm$/ and push @files, $File::Find::name },
no_chdir => 1
},
-e 'blib' ? 'blib' : 'lib',
);

plan tests => @files * 3;

for my $file (@files) {
my $module = $file; $module =~ s,\.pm$,,; $module =~ s,.*/?lib/,,; $module =~ s,/,::,g;
ok eval "use $module; 1", "use $module" or diag $@;
Test::Pod::pod_file_ok($file);
Test::Pod::Coverage::pod_coverage_ok($module);
}

0 comments on commit b0baf5a

Please sign in to comment.