-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8465f25
Showing
10 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
blib* | ||
Makefile | ||
Makefile.old | ||
Build | ||
_build* | ||
pm_to_blib* | ||
*.tar.gz | ||
.lwpcookies | ||
Catalyst-View-Template-Declare-* | ||
cover_db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Revision history for Catalyst-View-Template-Declare | ||
|
||
0.01 Date/time | ||
First version, released on an unsuspecting world. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Changes | ||
MANIFEST | ||
META.yml # Will be created by "make dist" | ||
Makefile.PL | ||
README | ||
lib/Catalyst/View/Template/Declare.pm | ||
t/00-load.t | ||
t/boilerplate.t | ||
t/pod-coverage.t | ||
t/pod.t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use inc::Module::Install; | ||
|
||
name 'Catalyst-View-Template-Declare'; | ||
all_from 'lib/Catalyst/View/Template/Declare.pm'; | ||
|
||
build_requires 'Test::More'; | ||
|
||
auto_install; | ||
|
||
WriteAll; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Catalyst-View-Template-Declare | ||
|
||
The README is used to introduce the module and provide instructions on | ||
how to install the module, any machine dependencies it may have (for | ||
example C compilers and installed libraries) and any other information | ||
that should be provided before the module is installed. | ||
|
||
A README file is required for CPAN modules since CPAN extracts the README | ||
file from a module distribution so that people browsing the archive | ||
can use it get an idea of the modules uses. It is usually a good idea | ||
to provide version information here so that people can decide whether | ||
fixes for the module are worth downloading. | ||
|
||
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 Catalyst::View::Template::Declare | ||
|
||
You can also look for information at: | ||
|
||
Search CPAN | ||
http://search.cpan.org/dist/Catalyst-View-Template-Declare | ||
|
||
CPAN Request Tracker: | ||
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-View-Template-Declare | ||
|
||
AnnoCPAN, annotated CPAN documentation: | ||
http://annocpan.org/dist/Catalyst-View-Template-Declare | ||
|
||
CPAN Ratings: | ||
http://cpanratings.perl.org/d/Catalyst-View-Template-Declare | ||
|
||
COPYRIGHT AND LICENCE | ||
|
||
Copyright (C) 2007 Jonathan Rockway | ||
|
||
This program is free software; you can redistribute it and/or modify it | ||
under the same terms as Perl itself. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package Catalyst::View::Template::Declare; | ||
|
||
use warnings; | ||
use strict; | ||
use base qw(Catalyst::View Template::Declare); | ||
|
||
sub process { | ||
my ($self, $c) = @_; | ||
$c->response->body('Hello, world.'); | ||
} | ||
|
||
1; | ||
__END__ | ||
=head1 NAME | ||
Catalyst::View::Template::Declare - Use Template::Declare in Catalyst | ||
=head1 VERSION | ||
Version 0.01 | ||
=cut | ||
our $VERSION = '0.01'; | ||
=head1 SYNOPSIS | ||
=head1 AUTHOR | ||
Jonathan Rockway, C<< <jrockway at cpan.org> >> | ||
=head1 BUGS | ||
Please report any bugs or feature requests to | ||
C<bug-catalyst-view-template-declare at rt.cpan.org>, or through the web interface at | ||
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-View-Template-Declare>. | ||
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 Catalyst::View::Template::Declare | ||
You can also look for information at: | ||
=over 4 | ||
=item * AnnoCPAN: Annotated CPAN documentation | ||
L<http://annocpan.org/dist/Catalyst-View-Template-Declare> | ||
=item * CPAN Ratings | ||
L<http://cpanratings.perl.org/d/Catalyst-View-Template-Declare> | ||
=item * RT: CPAN's request tracker | ||
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-View-Template-Declare> | ||
=item * Search CPAN | ||
L<http://search.cpan.org/dist/Catalyst-View-Template-Declare> | ||
=back | ||
=head1 ACKNOWLEDGEMENTS | ||
L<Template::Declare> | ||
=head1 COPYRIGHT & LICENSE | ||
Copyright 2007 Jonathan Rockway, all rights reserved. | ||
This program is free software; you can redistribute it and/or modify it | ||
under the same terms as Perl itself. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!perl -T | ||
|
||
use Test::More tests => 1; | ||
|
||
BEGIN { | ||
use_ok( 'Catalyst::View::Template::Declare' ); | ||
} | ||
|
||
diag( "Testing Catalyst::View::Template::Declare $Catalyst::View::Template::Declare::VERSION, Perl $], $^X" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!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"); | ||
} | ||
} | ||
|
||
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) | ||
); | ||
|
||
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]/, | ||
); | ||
} | ||
|
||
module_boilerplate_ok('lib/Catalyst/View/Template/Declare.pm'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!perl -T | ||
|
||
use Test::More; | ||
eval "use Test::Pod::Coverage 1.04"; | ||
plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; | ||
all_pod_coverage_ok(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!perl -T | ||
|
||
use Test::More; | ||
eval "use Test::Pod 1.14"; | ||
plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; | ||
all_pod_files_ok(); |