r40853 - in /branches/upstream/libcatalyst-plugin-setenv-perl: ./ current/ current/lib/ current/lib/Catalyst/ current/lib/Catalyst/Plugin/ current/t/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Tue Jul 28 02:42:37 UTC 2009
Author: jawnsy-guest
Date: Tue Jul 28 02:42:28 2009
New Revision: 40853
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=40853
Log:
[svn-inject] Installing original source of libcatalyst-plugin-setenv-perl
Added:
branches/upstream/libcatalyst-plugin-setenv-perl/
branches/upstream/libcatalyst-plugin-setenv-perl/current/
branches/upstream/libcatalyst-plugin-setenv-perl/current/Build.PL
branches/upstream/libcatalyst-plugin-setenv-perl/current/Changes
branches/upstream/libcatalyst-plugin-setenv-perl/current/MANIFEST
branches/upstream/libcatalyst-plugin-setenv-perl/current/META.yml
branches/upstream/libcatalyst-plugin-setenv-perl/current/README
branches/upstream/libcatalyst-plugin-setenv-perl/current/lib/
branches/upstream/libcatalyst-plugin-setenv-perl/current/lib/Catalyst/
branches/upstream/libcatalyst-plugin-setenv-perl/current/lib/Catalyst/Plugin/
branches/upstream/libcatalyst-plugin-setenv-perl/current/lib/Catalyst/Plugin/Setenv.pm
branches/upstream/libcatalyst-plugin-setenv-perl/current/t/
branches/upstream/libcatalyst-plugin-setenv-perl/current/t/00-load.t
branches/upstream/libcatalyst-plugin-setenv-perl/current/t/01-live.t
branches/upstream/libcatalyst-plugin-setenv-perl/current/t/TestApp.pm
branches/upstream/libcatalyst-plugin-setenv-perl/current/t/boilerplate.t
branches/upstream/libcatalyst-plugin-setenv-perl/current/t/pod-coverage.t
branches/upstream/libcatalyst-plugin-setenv-perl/current/t/pod.t
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/Build.PL?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/Build.PL (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/Build.PL Tue Jul 28 02:42:28 2009
@@ -1,0 +1,21 @@
+use strict;
+use warnings;
+use Module::Build;
+
+my $builder = Module::Build->new(
+ module_name => 'Catalyst::Plugin::Setenv',
+ license => 'perl',
+ dist_author => 'Jonathan Rockway <jrockway at cpan.org>',
+ dist_version_from => 'lib/Catalyst/Plugin/Setenv.pm',
+ requires => {
+ 'Catalyst::Runtime' => '5.7', # duh
+ 'NEXT' => 0, # duh
+ },
+ build_requires => {
+ 'Test::More' => 0,
+ 'FindBin' => 0,
+ },
+ add_to_cleanup => [ 'Catalyst-Plugin-Setenv-*' ],
+);
+
+$builder->create_build_script();
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/Changes?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/Changes (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/Changes Tue Jul 28 02:42:28 2009
@@ -1,0 +1,11 @@
+Revision history for Catalyst-Plugin-Setenv
+
+0.03 18 April 2008
+ * MRO::Compat
+
+0.02 25 January 2006
+ * Add the ability to append config'd environemnt variable
+ to current value
+
+0.01 12 October 2006
+ * First version, released on an unsuspecting world.
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/MANIFEST?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/MANIFEST (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/MANIFEST Tue Jul 28 02:42:28 2009
@@ -1,0 +1,12 @@
+Build.PL
+Changes
+lib/Catalyst/Plugin/Setenv.pm
+MANIFEST This list of files
+META.yml
+README
+t/00-load.t
+t/01-live.t
+t/boilerplate.t
+t/pod-coverage.t
+t/pod.t
+t/TestApp.pm
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/META.yml?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/META.yml (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/META.yml Tue Jul 28 02:42:28 2009
@@ -1,0 +1,23 @@
+---
+name: Catalyst-Plugin-Setenv
+version: 0.03
+author:
+ - 'Jonathan Rockway <jrockway at cpan.org>'
+abstract: Allows you to set up the environment from Catalyst's config file.
+license: perl
+resources:
+ license: http://dev.perl.org/licenses/
+requires:
+ Catalyst::Runtime: 5.7
+ NEXT: 0
+build_requires:
+ FindBin: 0
+ Test::More: 0
+provides:
+ Catalyst::Plugin::Setenv:
+ file: lib/Catalyst/Plugin/Setenv.pm
+ version: 0.03
+generated_by: Module::Build version 0.3
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/README?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/README (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/README Tue Jul 28 02:42:28 2009
@@ -1,0 +1,40 @@
+Catalyst-Plugin-Setenv
+
+Allows you to set up the environment from Catalyst's config file.
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+ perl Build.PL
+ ./Build
+ ./Build test
+ ./Build install
+
+
+SUPPORT AND DOCUMENTATION
+
+After installing, you can find documentation for this module with the perldoc command.
+
+ perldoc Catalyst::Plugin::Setenv
+
+You can also look for information at:
+
+ Search CPAN
+ http://search.cpan.org/dist/Catalyst-Plugin-Setenv
+
+ CPAN Request Tracker:
+ http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Plugin-Setenv
+
+ AnnoCPAN, annotated CPAN documentation:
+ http://annocpan.org/dist/Catalyst-Plugin-Setenv
+
+ CPAN Ratings:
+ http://cpanratings.perl.org/d/Catalyst-Plugin-Setenv
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2006 Jonathan Rockway
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/lib/Catalyst/Plugin/Setenv.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/lib/Catalyst/Plugin/Setenv.pm?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/lib/Catalyst/Plugin/Setenv.pm (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/lib/Catalyst/Plugin/Setenv.pm Tue Jul 28 02:42:28 2009
@@ -1,0 +1,161 @@
+package Catalyst::Plugin::Setenv;
+
+use warnings;
+use strict;
+use MRO::Compat;
+
+=head1 NAME
+
+Catalyst::Plugin::Setenv - Allows you to set up the environment from Catalyst's config file.
+
+=head1 VERSION
+
+Version 0.03
+
+=cut
+
+our $VERSION = '0.03';
+
+=head1 SYNOPSIS
+
+In your application:
+
+ use Catalyst qw/Setenv/;
+
+In your config file:
+
+ environment:
+ FOO: bar
+ BAR: baz
+
+When your app starts, C<$ENV{FOO}> will be "bar", and C<$ENV{BAR}> will be
+"baz".
+
+You can also append and prepend to existing environment variables.
+For example, if C<$PATH> is C</bin:/usr/bin>, you can append
+C</myapp/bin> by writing:
+
+ environment:
+ PATH: "::/myapp/bin"
+
+After that, C<$PATH> will be set to C</bin:/usr/bin:/myapp/bin>. You
+can prepend, too:
+
+ environment:
+ PATH: "/myapp/bin::"
+
+which yields C</myapp/bin:/bin:/usr/bin>.
+
+If you want a literal colon at the beginning or end of the environment
+variable, escape it with a C<\>, like C<\:foo> or C<foo\:>. Note that
+slashes aren't meaningful elsewhere, they're inserted verbatim into
+the relevant environment variable.
+
+=head1 EXPORT
+
+A list of functions that can be exported. You can delete this section
+if you don't export anything, such as for a purely object-oriented module.
+
+=head1 FUNCTIONS
+
+=head2 setup
+
+Calls the other setup methods, and then sets the environment variables.
+
+=cut
+
+sub setup {
+ my $c = shift;
+
+ $c->next::method(@_);
+
+ my $env = $c->config->{environment};
+ return unless ref $env eq 'HASH';
+
+ foreach my $key (keys %$env){
+ my $value = $env->{$key};
+
+ if($value =~ /^:(.+)$/){
+ $ENV{$key} .= $1;
+ }
+ elsif($value =~ /^(.+[^\\]):$/){
+ $ENV{$key} = $1. $ENV{$key};
+ }
+ else {
+ $value =~ s/(^\\:|\\:$)/:/;
+ $value =~ s/(^\\\\:|\\\\:$)/\\:/;
+
+ $ENV{$key} = $value;
+ }
+ }
+
+ return;
+}
+
+=head1 AUTHOR
+
+Jonathan Rockway, C<< <jrockway at cpan.org> >>
+
+=head1 BUGS
+
+=head2 Escaping
+
+Things like "\:foo" can't be literally inserted into an environment
+variable, due to my simplistic escaping scheme. Patches to fix this
+(but not interpert C<\>s anywhere else) are welcome.
+
+=head2 REPORTING
+
+Please report any bugs or feature requests to
+C<bug-catalyst-plugin-setenv at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Plugin-Setenv>.
+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::Plugin::Setenv
+
+You can also look for information at:
+
+=over 4
+
+=item * The Catalyst Website
+
+L<http://www.catalystframework.org/>
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/Catalyst-Plugin-Setenv>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/Catalyst-Plugin-Setenv>
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Plugin-Setenv>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/Catalyst-Plugin-Setenv>
+
+=back
+
+=head1 ACKNOWLEDGEMENTS
+
+Thanks to Bill Moseley's message to the mailing list that prompted me
+to write this.
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2006 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.
+
+=cut
+
+1; # End of Catalyst::Plugin::Setenv
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/t/00-load.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/t/00-load.t?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/t/00-load.t (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/t/00-load.t Tue Jul 28 02:42:28 2009
@@ -1,0 +1,9 @@
+#!perl -T
+
+use Test::More tests => 1;
+
+BEGIN {
+ use_ok( 'Catalyst::Plugin::Setenv' );
+}
+
+diag( "Testing Catalyst::Plugin::Setenv $Catalyst::Plugin::Setenv::VERSION, Perl $], $^X" );
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/t/01-live.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/t/01-live.t?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/t/01-live.t (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/t/01-live.t Tue Jul 28 02:42:28 2009
@@ -1,0 +1,23 @@
+#!/usr/bin/perl
+# 01-live.t
+# Copyright (c) 2006 Jonathan Rockway <jrockway at cpan.org>
+BEGIN {
+ $ENV{EXISTS} = q{XXX};
+ $ENV{PREPEND} = q{XXX};
+ $ENV{SLASH} = q{FAIL};
+ $ENV{END} = q{FAIL};
+};
+
+use Test::More tests => 7;
+use FindBin qw($Bin);
+use lib "$Bin";
+use Catalyst::Test qw(TestApp);
+
+
+is($ENV{FOO}, 'foo');
+is($ENV{BAR}, 'bar');
+is($ENV{EXISTS}, 'XXX:YYY');
+is($ENV{PREPEND}, 'YYY:XXX');
+is($ENV{NEW}, ':YYY');
+is($ENV{SLASH}, '\:YYY');
+is($ENV{END}, 'YYY\:');
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/t/TestApp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/t/TestApp.pm?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/t/TestApp.pm (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/t/TestApp.pm Tue Jul 28 02:42:28 2009
@@ -1,0 +1,17 @@
+#!/usr/bin/perl
+# TestApp.pm
+# Copyright (c) 2006 Jonathan Rockway <jrockway at cpan.org>
+
+package TestApp;
+use FindBin qw($Bin);
+use Catalyst qw/Setenv/;
+__PACKAGE__->config({environment => {FOO => 'foo',
+ BAR => 'bar',
+ EXISTS => '::YYY',
+ PREPEND => 'YYY::',
+ NEW => "\\:YYY",
+ SLASH => "\\\\:YYY",
+ END => "YYY\\\\:", }}
+ );
+__PACKAGE__->setup;
+1;
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/t/boilerplate.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/t/boilerplate.t?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/t/boilerplate.t (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/t/boilerplate.t Tue Jul 28 02:42:28 2009
@@ -1,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/Plugin/Setenv.pm');
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/t/pod-coverage.t?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/t/pod-coverage.t (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/t/pod-coverage.t Tue Jul 28 02:42:28 2009
@@ -1,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();
Added: branches/upstream/libcatalyst-plugin-setenv-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-setenv-perl/current/t/pod.t?rev=40853&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-setenv-perl/current/t/pod.t (added)
+++ branches/upstream/libcatalyst-plugin-setenv-perl/current/t/pod.t Tue Jul 28 02:42:28 2009
@@ -1,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();
More information about the Pkg-perl-cvs-commits
mailing list