Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8107ad7fd0 | ||
|
|
f423aee854 | ||
|
|
6b402d3357 |
7
Changes
7
Changes
@@ -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
|
0.02 Mon, 06 Apr 2009 22:28:52 +0100
|
||||||
* Doc improvmens (Ash Berlin, spurned on by Jon Rockway)
|
* Doc improvmens (Ash Berlin, spurned on by Jon Rockway)
|
||||||
|
|
||||||
|
|||||||
4
LICENSE
4
LICENSE
@@ -1,9 +1,9 @@
|
|||||||
This software is copyright (c) 2009 by Florian Ragwitz.
|
This software is copyright (c) 2009 by Florian Ragwitz.
|
||||||
|
|
||||||
This is free software; you can redistribute it and/or modify it under
|
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
|
a) the GNU General Public License as published by the Free
|
||||||
Software Foundation; either version 1, or (at your option) any
|
Software Foundation; either version 1, or (at your option) any
|
||||||
|
|||||||
2
MANIFEST
2
MANIFEST
@@ -9,4 +9,6 @@ lib/CatalystX/REPL.pm
|
|||||||
t/basic.t
|
t/basic.t
|
||||||
t/lib/TestApp.pm
|
t/lib/TestApp.pm
|
||||||
t/lib/TestApp/Controller/Foo.pm
|
t/lib/TestApp/Controller/Foo.pm
|
||||||
|
t/release-pod-coverage.t
|
||||||
|
t/release-pod-syntax.t
|
||||||
t/request.pl
|
t/request.pl
|
||||||
23
META.yml
23
META.yml
@@ -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:
|
author:
|
||||||
- Tomas Doran <bobtfish@bobtfish.net>
|
- 'Tomas Doran <bobtfish@bobtfish.net>'
|
||||||
- Florian Ragwitz <rafl@debian.org>
|
- 'Florian Ragwitz <rafl@debian.org>'
|
||||||
- Ash Berlin <ash@cpan.org>
|
- 'Ash Berlin <ash@cpan.org>'
|
||||||
generated_by: Dist::Zilla::Plugin::MetaYaml version 1.004
|
generated_by: 'Dist::Zilla::Plugin::MetaYAML version 1.092200'
|
||||||
license: perl
|
license: perl
|
||||||
|
meta-spec:
|
||||||
|
url: http://module-build.sourceforge.net/META-spec-v1.4.html
|
||||||
|
version: 1.4
|
||||||
name: CatalystX-REPL
|
name: CatalystX-REPL
|
||||||
requires:
|
requires:
|
||||||
Carp::REPL: 0
|
Carp::REPL: 0
|
||||||
Catalyst: 5.800006
|
Catalyst: 5.800006
|
||||||
namespace::clean: 0
|
namespace::autoclean: 0
|
||||||
version: 0.02
|
version: 0.04
|
||||||
|
|||||||
10
Makefile.PL
10
Makefile.PL
@@ -8,13 +8,13 @@ WriteMakefile(
|
|||||||
DISTNAME => 'CatalystX-REPL',
|
DISTNAME => 'CatalystX-REPL',
|
||||||
NAME => 'CatalystX::REPL',
|
NAME => 'CatalystX::REPL',
|
||||||
AUTHOR => 'Tomas\ Doran\ \<bobtfish\@bobtfish\.net\>\,\ Florian\ Ragwitz\ \<rafl\@debian\.org\>\,\ Ash\ Berlin\ \<ash\@cpan\.org\>',
|
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',
|
ABSTRACT => 'read\-eval\-print\-loop\ for\ debugging\ your\ Catalyst\ application',
|
||||||
VERSION => '0.02',
|
VERSION => '0.04',
|
||||||
EXE_FILES => [ qw() ],
|
EXE_FILES => [ qw() ],
|
||||||
(eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
|
(eval { ExtUtils::MakeMaker->VERSION(6.31) } ? (LICENSE => 'perl') : ()),
|
||||||
PREREQ_PM => {
|
PREREQ_PM => {
|
||||||
"namespace::clean" => '0',
|
"namespace::autoclean" => '0',
|
||||||
"Catalyst" => '5.800006',
|
"Catalyst" => '5.80006',
|
||||||
"Carp::REPL" => '0',
|
"Carp::REPL" => '0',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
4
README
4
README
@@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
|
|
||||||
This archive contains the distribution CatalystX-REPL, version
|
This archive contains the distribution CatalystX-REPL, version
|
||||||
0.02:
|
0.04:
|
||||||
|
|
||||||
read-eval-print-loop for debugging your Catalyst application
|
read-eval-print-loop for debugging your Catalyst application
|
||||||
|
|
||||||
This software is copyright (c) 2009 by Florian Ragwitz.
|
This software is copyright (c) 2009 by Florian Ragwitz.
|
||||||
|
|
||||||
This is free software; you can redistribute it and/or modify it under
|
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.
|
||||||
|
|
||||||
|
|||||||
6
dist.ini
6
dist.ini
@@ -1,5 +1,5 @@
|
|||||||
name = CatalystX-REPL
|
name = CatalystX-REPL
|
||||||
version = 0.02
|
version = 0.04
|
||||||
author = Tomas Doran <bobtfish@bobtfish.net>
|
author = Tomas Doran <bobtfish@bobtfish.net>
|
||||||
author = Florian Ragwitz <rafl@debian.org>
|
author = Florian Ragwitz <rafl@debian.org>
|
||||||
author = Ash Berlin <ash@cpan.org>
|
author = Ash Berlin <ash@cpan.org>
|
||||||
@@ -7,7 +7,7 @@ license = Perl_5
|
|||||||
copyright_holder = Florian Ragwitz
|
copyright_holder = Florian Ragwitz
|
||||||
|
|
||||||
[Prereq]
|
[Prereq]
|
||||||
namespace::clean = 0
|
namespace::autoclean = 0
|
||||||
Carp::REPL = 0
|
Carp::REPL = 0
|
||||||
Catalyst = 5.800006
|
Catalyst = 5.800006
|
||||||
|
|
||||||
@@ -16,4 +16,4 @@ bundle = @Classic
|
|||||||
remove = PodVersion
|
remove = PodVersion
|
||||||
remove = BumpVersion
|
remove = BumpVersion
|
||||||
|
|
||||||
[PodWeaver]
|
[PodPurler]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package CatalystX::REPL;
|
package CatalystX::REPL;
|
||||||
our $VERSION = '0.02';
|
our $VERSION = '0.04';
|
||||||
|
|
||||||
# ABSTRACT: read-eval-print-loop for debugging your Catalyst application
|
# ABSTRACT: read-eval-print-loop for debugging your Catalyst application
|
||||||
|
|
||||||
@@ -7,25 +7,40 @@ use Moose::Role;
|
|||||||
use Carp::REPL ();
|
use Carp::REPL ();
|
||||||
use Catalyst::Utils;
|
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) = @_;
|
my ($self) = @_;
|
||||||
$SIG{__DIE__} = \&Carp::REPL::repl
|
if (my $repl_options = Catalyst::Utils::env_value($self, 'repl')) {
|
||||||
if Catalyst::Utils::env_value($self, 'repl');
|
Carp::REPL->import(split q{,}, $repl_options);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
CatalystX::REPL - read-eval-print-loop for debugging your Catalyst application
|
CatalystX::REPL - read-eval-print-loop for debugging your Catalyst application
|
||||||
|
|
||||||
=head1 VERSION
|
=head1 VERSION
|
||||||
|
|
||||||
version 0.02
|
version 0.04
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
@@ -65,13 +80,26 @@ variables are set:
|
|||||||
|
|
||||||
$ $c
|
$ $c
|
||||||
MyApp=HASH(0xcea6ec)
|
MyApp=HASH(0xcea6ec)
|
||||||
$ $c->req->uri
|
$ $c->req->uri
|
||||||
http://localhost/foo/bar
|
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
|
Carp::REPL uses L<Devel::REPL> for the shell, so direct any questions how how
|
||||||
to use or customize the repl at that module.
|
to use or customize the repl at that module.
|
||||||
|
|
||||||
|
=head1 SEE ALSO
|
||||||
|
|
||||||
|
L<Carp::REPL>
|
||||||
|
|
||||||
|
L<Devel::REPL>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=head1 AUTHORS
|
=head1 AUTHORS
|
||||||
|
|
||||||
Tomas Doran <bobtfish@bobtfish.net>
|
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 software is copyright (c) 2009 by Florian Ragwitz.
|
||||||
|
|
||||||
This is free software; you can redistribute it and/or modify it under
|
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>
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package TestApp;
|
package TestApp;
|
||||||
our $VERSION = '0.02';
|
our $VERSION = '0.04';
|
||||||
|
|
||||||
|
|
||||||
use Moose;
|
use Moose;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package TestApp::Controller::Foo;
|
package TestApp::Controller::Foo;
|
||||||
our $VERSION = '0.02';
|
our $VERSION = '0.04';
|
||||||
|
|
||||||
|
|
||||||
use Moose;
|
use Moose;
|
||||||
|
|||||||
21
t/release-pod-coverage.t
Normal file
21
t/release-pod-coverage.t
Normal 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
15
t/release-pod-syntax.t
Normal 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();
|
||||||
@@ -1,13 +1,11 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
BEGIN { @ENV{qw/CATALYST_DEBUG CATALYST_REPL/} = (1, 1); }
|
BEGIN { @ENV{qw/CATALYST_REPL/} = 'noprofile'; }
|
||||||
|
|
||||||
use FindBin;
|
use FindBin;
|
||||||
use lib "$FindBin::Bin/lib";
|
use lib "$FindBin::Bin/lib";
|
||||||
|
|
||||||
use Catalyst::Test 'TestApp';
|
use Catalyst::Test 'TestApp';
|
||||||
|
|
||||||
$Carp::REPL::noprofile = 1;
|
|
||||||
|
|
||||||
request($ARGV[0]);
|
request($ARGV[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user