[Catalyst-commits] r8489 - / Perl-Dist-CatInABox
Perl-Dist-CatInABox/trunk Perl-Dist-CatInABox/trunk/lib
Perl-Dist-CatInABox/trunk/lib/Perl
Perl-Dist-CatInABox/trunk/lib/Perl/Dist
Perl-Dist-CatInABox/trunk/script Perl-Dist-CatInABox/trunk/t
zarquon at dev.catalyst.perl.org
zarquon at dev.catalyst.perl.org
Wed Oct 1 11:19:06 BST 2008
Author: zarquon
Date: 2008-10-01 11:19:06 +0100 (Wed, 01 Oct 2008)
New Revision: 8489
Added:
Perl-Dist-CatInABox/
Perl-Dist-CatInABox/branches/
Perl-Dist-CatInABox/tags/
Perl-Dist-CatInABox/trunk/
Perl-Dist-CatInABox/trunk/.cvsignore
Perl-Dist-CatInABox/trunk/Changes
Perl-Dist-CatInABox/trunk/MANIFEST
Perl-Dist-CatInABox/trunk/Makefile.PL
Perl-Dist-CatInABox/trunk/README
Perl-Dist-CatInABox/trunk/lib/
Perl-Dist-CatInABox/trunk/lib/Perl/
Perl-Dist-CatInABox/trunk/lib/Perl/Dist/
Perl-Dist-CatInABox/trunk/lib/Perl/Dist/CatInABox.pm
Perl-Dist-CatInABox/trunk/script/
Perl-Dist-CatInABox/trunk/script/perldist_catinabox
Perl-Dist-CatInABox/trunk/t/
Perl-Dist-CatInABox/trunk/t/00-load.t
Perl-Dist-CatInABox/trunk/t/boilerplate.t
Perl-Dist-CatInABox/trunk/t/pod-coverage.t
Perl-Dist-CatInABox/trunk/t/pod.t
Modified:
/
Log:
r14059 at zaphod: kd | 2008-09-29 15:17:24 +1000
initial catinabox for strawberry perl on a stick and the like
Property changes on:
___________________________________________________________________
Name: svk:merge
- 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:14058
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909
+ 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:14059
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909
Added: Perl-Dist-CatInABox/trunk/.cvsignore
===================================================================
--- Perl-Dist-CatInABox/trunk/.cvsignore (rev 0)
+++ Perl-Dist-CatInABox/trunk/.cvsignore 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,10 @@
+blib*
+Makefile
+Makefile.old
+Build
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+Perl-Dist-CatInABox-*
+cover_db
Added: Perl-Dist-CatInABox/trunk/Changes
===================================================================
--- Perl-Dist-CatInABox/trunk/Changes (rev 0)
+++ Perl-Dist-CatInABox/trunk/Changes 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,5 @@
+Revision history for Perl-Dist-CatInABox
+
+0.01 Date/time
+ First version, released on an unsuspecting world.
+
Added: Perl-Dist-CatInABox/trunk/MANIFEST
===================================================================
--- Perl-Dist-CatInABox/trunk/MANIFEST (rev 0)
+++ Perl-Dist-CatInABox/trunk/MANIFEST 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,8 @@
+Changes
+MANIFEST
+Makefile.PL
+README
+lib/Perl/Dist/CatInABox.pm
+t/00-load.t
+t/pod-coverage.t
+t/pod.t
Added: Perl-Dist-CatInABox/trunk/Makefile.PL
===================================================================
--- Perl-Dist-CatInABox/trunk/Makefile.PL (rev 0)
+++ Perl-Dist-CatInABox/trunk/Makefile.PL 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,15 @@
+use inc::Module::Install;
+
+name 'Perl-Dist-CatInABox';
+all_from 'lib/Perl/Dist/CatInABox.pm';
+requires 'Perl::Dist::Strawberry';
+author 'Kieren Diment <zarquon at cpan.org>';
+install_script 'perldics_catinabox';
+
+
+build_requires 'Test::More';
+
+auto_install;
+
+WriteAll;
+
Added: Perl-Dist-CatInABox/trunk/README
===================================================================
--- Perl-Dist-CatInABox/trunk/README (rev 0)
+++ Perl-Dist-CatInABox/trunk/README 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,47 @@
+Perl-Dist-CatInABox
+
+Subclassed version of Perl::Dist::Strawberry that provides Catalyst
+web application framework, Template Toolkit templating language, (and
+Catalyst view), DBIx::Class object relational model (and Catalyst
+model), and the Catalyst authentication and authorization framework
+(with DBIC and htpassword storage backends, and web based, and http
+(basic or digest) authentication credentials).
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+SUPPORT AND DOCUMENTATION
+
+After installing, you can find documentation for this module with the
+perldoc command.
+
+ perldoc Perl::Dist::CatInABox
+
+You can also look for information at:
+
+ RT, CPAN's request tracker
+ http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Dist-CatInABox
+
+ AnnoCPAN, Annotated CPAN documentation
+ http://annocpan.org/dist/Perl-Dist-CatInABox
+
+ CPAN Ratings
+ http://cpanratings.perl.org/d/Perl-Dist-CatInABox
+
+ Search CPAN
+ http://search.cpan.org/dist/Perl-Dist-CatInABox
+
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2008 Kieren Diment
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
Added: Perl-Dist-CatInABox/trunk/lib/Perl/Dist/CatInABox.pm
===================================================================
--- Perl-Dist-CatInABox/trunk/lib/Perl/Dist/CatInABox.pm (rev 0)
+++ Perl-Dist-CatInABox/trunk/lib/Perl/Dist/CatInABox.pm 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,192 @@
+package Perl::Dist::CatInABox;
+
+
+use warnings;
+use strict;
+
+=head1 NAME
+
+Perl::Dist::CatInABox - Catalyst (and supporting modules) on top of
+Strawberry perl for win32.
+
+=head1 DESCRIPTION
+
+See L<Perl::Dist::Strawberry> for details. This distribution installs
+the following modules (and their dependencies) to cover common modules
+used in Catalyst applications. To that end this distribution includes
+(on top of the reqular Strawberry perl modules):
+
+=over
+
+=item *
+
+L<Catalyst::Devel>
+
+=item *
+
+L<Template|Template Toolkit>
+
+=item *
+
+L<DBIx::Class>
+
+=item *
+
+L<DBIx::Class::EncodedColumn>
+
+=item *
+
+L<DBIx::Class::Timestamp>
+
+=item *
+
+L<DBIx::Class::InflateColumn::DateTime>
+
+=item *
+
+L<DBIx::Class::Schema::Loader>
+
+=item *
+
+L<Catalyst::View::TT>
+
+=item *
+
+L<Catalyst::View::JSON>
+
+=item *
+
+L<Catalyst::Model::DBIC::Schema>
+
+=item *
+
+L<Catalyst::Model::DBIC::File>
+
+=item *
+
+L<Catalyst::Plugin::Authentication>
+
+=item *
+
+L<Catalyst::Authentication::Store::DBIx::Class>
+
+=item *
+
+L<Catalyst::Authentication::Store::Htpasswd>
+
+=item *
+
+L<Catalyst::Authentication::Credential::Password>
+
+=item *
+
+L<Catalyst::Authentication::Credential::HTTP>
+
+=back
+
+=head1 VERSION
+
+Version 0.01
+
+=cut
+
+our $VERSION = '0.01';
+
+
+
+=head1 AUTHOR
+
+Kieren Diment, C<< <zarquon at cpan.org> >>
+
+=head1 BUGS
+
+Please report any bugs or feature requests to C<bug-perl-dist-catinabox at rt.cpan.org>, or through
+the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perl-Dist-CatInABox>. 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 Perl::Dist::CatInABox
+
+
+You can also look for information at:
+
+=over 4
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Dist-CatInABox>
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/Perl-Dist-CatInABox>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/Perl-Dist-CatInABox>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/Perl-Dist-CatInABox>
+
+=back
+
+
+=head1 ACKNOWLEDGEMENTS
+
+Adam Kennedy for his Strawberry Perl project. All the Catalyst
+contributors (L<http://catalystframework.org>).
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2008 Kieren Diment, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+use base 'Perl::Dist::Strawberry';
+
+sub new {
+ shift->SUPER::new(
+ app_id => 'catalyinaboxperl',
+ app_name => 'Catalyst In A Box Perl',
+ app_publisher => 'Vanilla Perl Project',
+ app_publisher_url => 'http://vanillaperl.org/',
+ image_dir => 'C:\\strawberry',
+
+ # Build both exe and zip versions
+ exe => 1,
+ zip => 1,
+
+ @_,
+ );
+}
+
+sub install_perl_modules {
+ my $self = shift;
+ $self->SUPER::install_perl_modules(@_);
+ $self->install_modules(qw{
+ Catalyst::Devel
+ Template
+ DBIx::Class
+ DBIx::Class::EncodedColumn
+ DBIx::Class::Timestamp
+ DBIx::Class::InflateColumn::DateTime
+ DBIx::Class::Schema::Loader
+ Catalyst::View::TT
+ Catalyst::View::JSON
+ Catalyst::Model::DBIC::Schema
+ Catalyst::Model::DBIC::File
+ Catalyst::Plugin::Authentication
+ Catalyst::Authentication::Store::DBIx::Class
+ Catalyst::Authentication::Store::Htpasswd
+ Catalyst::Authentication::Credential::Password
+ Catalyst::Authentication::Credential::HTTP
+ });
+}
+
+1;
Added: Perl-Dist-CatInABox/trunk/script/perldist_catinabox
===================================================================
--- Perl-Dist-CatInABox/trunk/script/perldist_catinabox (rev 0)
+++ Perl-Dist-CatInABox/trunk/script/perldist_catinabox 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,90 @@
+#!/usr/bin/perl
+
+# A copy of perldist that does some strawberry-specific actions
+
+use 5.006;
+use strict;
+use warnings;
+use Params::Util qw{ _IDENTIFIER };
+use Pod::Usage;
+use Getopt::Long;
+use URI;
+use Perl::Dist::Machine;
+use Perl::Dist::CatInABox;
+
+use vars qw{$VERSION};
+BEGIN {
+ $VERSION = '1.04';
+}
+
+
+
+
+
+#####################################################################
+# Handle Options
+
+my $PERL_VERSION = undef;
+my $CPAN = undef;
+my $BINARY_ROOT = undef;
+my $FORCE = undef;
+my $result = GetOptions(
+ "perl_version=s" => \$PERL_VERSION,
+ "cpan=s" => \$CPAN,
+ "binary_root=s" => \$BINARY_ROOT,
+ "force" => \$FORCE,
+);
+
+# Get the distribution class name
+my $class = 'Perl::Dist::Strawberry';
+unless ( $class->isa('Perl::Dist') ) {
+ die "$class is not a Perl::Dist subclass";
+}
+
+
+
+
+
+# Generate options and hand off to the class
+my %options = (
+ # 5.8.8 may not build properly under
+ # a directory with spaces in it.
+ temp_dir => 'C:\\tmp',
+);
+if ( defined $PERL_VERSION ) {
+ $options{perl_version} = $PERL_VERSION;
+}
+if ( defined $CPAN ) {
+ $options{cpan} = URI->new( $CPAN );
+}
+if ( defined $BINARY_ROOT ) {
+ $options{binary_root} = $BINARY_ROOT;
+}
+if ( defined $FORCE ) {
+ $options{force} = 1;
+}
+
+# Create the machine
+my $machine = Perl::Dist::Machine->new(
+ class => 'Perl::Dist::Strawberry',
+ common => \%options,
+);
+$machine->add_dimension('version');
+$machine->add_option('version',
+ perl_version => '5100',
+ portable => 1,
+);
+$machine->add_option('version',
+ perl_version => '5100',
+);
+$machine->add_option('version',
+ perl_version => '588',
+);
+
+unless ( $machine->run ) {
+ die("Failed to run");
+}
+
+chdir $machine->output;
+
+exit(0);
Added: Perl-Dist-CatInABox/trunk/t/00-load.t
===================================================================
--- Perl-Dist-CatInABox/trunk/t/00-load.t (rev 0)
+++ Perl-Dist-CatInABox/trunk/t/00-load.t 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,9 @@
+#!perl -T
+
+use Test::More tests => 1;
+
+BEGIN {
+ use_ok( 'Perl::Dist::CatInABox' );
+}
+
+diag( "Testing Perl::Dist::CatInABox $Perl::Dist::CatInABox::VERSION, Perl $], $^X" );
Added: Perl-Dist-CatInABox/trunk/t/boilerplate.t
===================================================================
--- Perl-Dist-CatInABox/trunk/t/boilerplate.t (rev 0)
+++ Perl-Dist-CatInABox/trunk/t/boilerplate.t 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,55 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+sub not_in_file_ok {
+ my ($filename, %regex) = @_;
+ open( my $fh, '<', $filename )
+ or die "couldn't open $filename for reading: $!";
+
+ my %violated;
+
+ while (my $line = <$fh>) {
+ while (my ($desc, $regex) = each %regex) {
+ if ($line =~ $regex) {
+ push @{$violated{$desc}||=[]}, $.;
+ }
+ }
+ }
+
+ if (%violated) {
+ fail("$filename contains boilerplate text");
+ diag "$_ appears on lines @{$violated{$_}}" for keys %violated;
+ } else {
+ pass("$filename contains no boilerplate text");
+ }
+}
+
+sub module_boilerplate_ok {
+ my ($module) = @_;
+ not_in_file_ok($module =>
+ 'the great new $MODULENAME' => qr/ - The great new /,
+ 'boilerplate description' => qr/Quick summary of what the module/,
+ 'stub function definition' => qr/function[12]/,
+ );
+}
+
+TODO: {
+ local $TODO = "Need to replace the boilerplate text";
+
+ not_in_file_ok(README =>
+ "The README is used..." => qr/The README is used/,
+ "'version information here'" => qr/to provide version information/,
+ );
+
+ not_in_file_ok(Changes =>
+ "placeholder date/time" => qr(Date/time)
+ );
+
+ module_boilerplate_ok('lib/Perl/Dist/CatInABox.pm');
+
+
+}
+
Added: Perl-Dist-CatInABox/trunk/t/pod-coverage.t
===================================================================
--- Perl-Dist-CatInABox/trunk/t/pod-coverage.t (rev 0)
+++ Perl-Dist-CatInABox/trunk/t/pod-coverage.t 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod::Coverage
+my $min_tpc = 1.08;
+eval "use Test::Pod::Coverage $min_tpc";
+plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
+ if $@;
+
+# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
+# but older versions don't recognize some common documentation styles
+my $min_pc = 0.18;
+eval "use Pod::Coverage $min_pc";
+plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
+ if $@;
+
+all_pod_coverage_ok();
Added: Perl-Dist-CatInABox/trunk/t/pod.t
===================================================================
--- Perl-Dist-CatInABox/trunk/t/pod.t (rev 0)
+++ Perl-Dist-CatInABox/trunk/t/pod.t 2008-10-01 10:19:06 UTC (rev 8489)
@@ -0,0 +1,12 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod
+my $min_tp = 1.22;
+eval "use Test::Pod $min_tp";
+plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
+
+all_pod_files_ok();
More information about the Catalyst-commits
mailing list