2 Commits

Author SHA1 Message Date
Florian Ragwitz
f423aee854 Import of FLORA/CatalystX-REPL-0.04 from CPAN.
gitpan-cpan-distribution: CatalystX-REPL
gitpan-cpan-version:      0.04
gitpan-cpan-path:         FLORA/CatalystX-REPL-0.04.tar.gz
gitpan-cpan-author:       FLORA
gitpan-cpan-maturity:     released
2014-10-23 17:34:26 -05:00
Florian Ragwitz
6b402d3357 Import of FLORA/CatalystX-REPL-0.03 from CPAN.
gitpan-cpan-distribution: CatalystX-REPL
gitpan-cpan-version:      0.03
gitpan-cpan-path:         FLORA/CatalystX-REPL-0.03.tar.gz
gitpan-cpan-author:       FLORA
gitpan-cpan-maturity:     released
2014-10-23 17:34:26 -05:00
13 changed files with 110 additions and 39 deletions

View File

@@ -1,3 +1,10 @@
0.04 Tue, 11 Aug 2009 05:59:35 +0200
* Fix test failures with recent versions of Class::MOP.
* Switch from namespace::clean to namespace::autoclean.
0.03 Fri, 10 Apr 2009 01:47:22 +0200
* Allow passing options to Carp::REPL.
0.02 Mon, 06 Apr 2009 22:28:52 +0100
* Doc improvmens (Ash Berlin, spurned on by Jon Rockway)

View File

@@ -1,9 +1,9 @@
This software is copyright (c) 2009 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under
the same terms as perl itself.
the same terms as the Perl 5 programming language system itself.
Terms of Perl itself
Terms of the Perl programming language system itself
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any

View File

@@ -9,4 +9,6 @@ lib/CatalystX/REPL.pm
t/basic.t
t/lib/TestApp.pm
t/lib/TestApp/Controller/Foo.pm
t/release-pod-coverage.t
t/release-pod-syntax.t
t/request.pl

View File

@@ -1,14 +1,17 @@
---
abstract: read-eval-print-loop for debugging your Catalyst application
abstract: 'read-eval-print-loop for debugging your Catalyst application'
author:
- Tomas Doran <bobtfish@bobtfish.net>
- Florian Ragwitz <rafl@debian.org>
- Ash Berlin <ash@cpan.org>
generated_by: Dist::Zilla::Plugin::MetaYaml version 1.004
- 'Tomas Doran <bobtfish@bobtfish.net>'
- 'Florian Ragwitz <rafl@debian.org>'
- 'Ash Berlin <ash@cpan.org>'
generated_by: 'Dist::Zilla::Plugin::MetaYAML version 1.092200'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: CatalystX-REPL
requires:
Carp::REPL: 0
Catalyst: 5.800006
namespace::clean: 0
version: 0.02
namespace::autoclean: 0
version: 0.04

View File

@@ -8,12 +8,12 @@ WriteMakefile(
DISTNAME => 'CatalystX-REPL',
NAME => 'CatalystX::REPL',
AUTHOR => 'Tomas\ Doran\ \<bobtfish\@bobtfish\.net\>\,\ Florian\ Ragwitz\ \<rafl\@debian\.org\>\,\ Ash\ Berlin\ \<ash\@cpan\.org\>',
ABSTRACT => 'read-eval-print-loop for debugging your Catalyst application',
VERSION => '0.02',
ABSTRACT => 'read\-eval\-print\-loop\ for\ debugging\ your\ Catalyst\ application',
VERSION => '0.04',
EXE_FILES => [ qw() ],
(eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
(eval { ExtUtils::MakeMaker->VERSION(6.31) } ? (LICENSE => 'perl') : ()),
PREREQ_PM => {
"namespace::clean" => '0',
"namespace::autoclean" => '0',
"Catalyst" => '5.800006',
"Carp::REPL" => '0',
},

4
README
View File

@@ -1,12 +1,12 @@
This archive contains the distribution CatalystX-REPL, version
0.02:
0.04:
read-eval-print-loop for debugging your Catalyst application
This software is copyright (c) 2009 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under
the same terms as perl itself.
the same terms as the Perl 5 programming language system itself.

View File

@@ -1,5 +1,5 @@
name = CatalystX-REPL
version = 0.02
version = 0.04
author = Tomas Doran <bobtfish@bobtfish.net>
author = Florian Ragwitz <rafl@debian.org>
author = Ash Berlin <ash@cpan.org>
@@ -7,7 +7,7 @@ license = Perl_5
copyright_holder = Florian Ragwitz
[Prereq]
namespace::clean = 0
namespace::autoclean = 0
Carp::REPL = 0
Catalyst = 5.800006
@@ -16,4 +16,4 @@ bundle = @Classic
remove = PodVersion
remove = BumpVersion
[PodWeaver]
[PodPurler]

View File

@@ -1,5 +1,5 @@
package CatalystX::REPL;
our $VERSION = '0.02';
our $VERSION = '0.04';
# ABSTRACT: read-eval-print-loop for debugging your Catalyst application
@@ -7,25 +7,40 @@ use Moose::Role;
use Carp::REPL ();
use Catalyst::Utils;
use namespace::clean -except => 'meta';
use namespace::autoclean;
after setup_finalize => sub {
# Normally we'd hook into setup_finalize, but unfortunately for us Class::MOP
# localizes $SIG{__DIE__}, which Carp::REPL relies on, during load_class. That
# way the die handler will only be set up between between finishing setup and
# until after the run time of MyApp.pm ends, when MyApp is loaded with
# load_class, which it often is, for example in Catalyst::Test. Because of that
# we hook in at the start of each request and install our handler. This isn't
# too bad. After all, we're a debugging only tool. We could play some tricks to
# do this only once, before the first request and avoid reinstalling the
# handler on every subsequent request, but given we're a role, and we don't
# have a MyApp instance to store attributes in, we don't even try.
before prepare => sub {
my ($self) = @_;
$SIG{__DIE__} = \&Carp::REPL::repl
if Catalyst::Utils::env_value($self, 'repl');
if (my $repl_options = Catalyst::Utils::env_value($self, 'repl')) {
Carp::REPL->import(split q{,}, $repl_options);
}
};
1;
__END__
=pod
=head1 NAME
CatalystX::REPL - read-eval-print-loop for debugging your Catalyst application
=head1 VERSION
version 0.02
version 0.04
=head1 SYNOPSIS
@@ -69,9 +84,22 @@ variables are set:
http://localhost/foo/bar
$
Options like C<warn> or C<nodie> can be passed to Carp::REPL by putting them,
seperated by commas, into the environment variable:
MYAPP_REPL=warn,nodie ./script/myapp_server.pl
Carp::REPL uses L<Devel::REPL> for the shell, so direct any questions how how
to use or customize the repl at that module.
=head1 SEE ALSO
L<Carp::REPL>
L<Devel::REPL>
=head1 AUTHORS
Tomas Doran <bobtfish@bobtfish.net>
@@ -83,11 +111,8 @@ to use or customize the repl at that module.
This software is copyright (c) 2009 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under
the same terms as perl itself.
the same terms as the Perl 5 programming language system itself.
=head1 SEE ALSO
=cut
L<Carp::REPL>
L<Devel::REPL>

View File

@@ -1,5 +1,5 @@
package TestApp;
our $VERSION = '0.02';
our $VERSION = '0.04';
use Moose;

View File

@@ -1,5 +1,5 @@
package TestApp::Controller::Foo;
our $VERSION = '0.02';
our $VERSION = '0.04';
use Moose;

21
t/release-pod-coverage.t Normal file
View File

@@ -0,0 +1,21 @@
#!perl
BEGIN {
unless ($ENV{RELEASE_TESTING}) {
require Test::More;
Test::More::plan(skip_all => 'these tests are for release candidate testing');
}
}
use Test::More;
eval "use Test::Pod::Coverage 1.08";
plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
if $@;
eval "use Pod::Coverage::TrustPod";
plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage"
if $@;
all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });

15
t/release-pod-syntax.t Normal file
View File

@@ -0,0 +1,15 @@
#!perl
BEGIN {
unless ($ENV{RELEASE_TESTING}) {
require Test::More;
Test::More::plan(skip_all => 'these tests are for release candidate testing');
}
}
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
all_pod_files_ok();

View File

@@ -1,13 +1,11 @@
use strict;
use warnings;
BEGIN { @ENV{qw/CATALYST_DEBUG CATALYST_REPL/} = (1, 1); }
BEGIN { @ENV{qw/CATALYST_REPL/} = 'noprofile'; }
use FindBin;
use lib "$FindBin::Bin/lib";
use Catalyst::Test 'TestApp';
$Carp::REPL::noprofile = 1;
request($ARGV[0]);