1 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/lib/TestAppForComparison/Controller/Root.pm 1969-12-31 17:00:00.000000000 -0700
2 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/lib/TestAppForComparison/Controller/Root.pm 2009-06-15 15:59:41.000000000 -0600
4 +package TestAppForComparison::Controller::Root;
8 +use parent 'Catalyst::Controller';
11 +# Sets the actions in this controller to be registered with no prefix
12 +# so they function identically to actions created in MyApp.pm
14 +__PACKAGE__->config->{namespace} = '';
18 +TestAppForComparison::Controller::Root - Root Controller for TestAppForComparison
22 +[enter your description here]
32 +sub index :Path :Args(0) {
33 + my ( $self, $c ) = @_;
36 + $c->response->body( $c->welcome_message );
40 + my ( $self, $c ) = @_;
41 + $c->response->body( 'Page not found' );
42 + $c->response->status(404);
47 +Attempt to render a view, if needed.
51 +sub end : ActionClass('RenderView') {}
59 +This library is free software. You can redistribute it and/or modify
60 +it under the same terms as Perl itself.
65 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/lib/TestAppForComparison.pm 1969-12-31 17:00:00.000000000 -0700
66 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/lib/TestAppForComparison.pm 2009-06-15 15:59:41.000000000 -0600
68 +package TestAppForComparison;
73 +use Catalyst::Runtime 5.80;
75 +# Set flags and add plugins for the application
77 +# -Debug: activates the debug mode for very useful log messages
78 +# ConfigLoader: will load the configuration from a Config::General file in the
79 +# application's home directory
80 +# Static::Simple: will serve static files from the application's root
83 +use parent qw/Catalyst/;
84 +use Catalyst qw/-Debug
87 +our $VERSION = '0.01';
89 +# Configure the application.
91 +# Note that settings in testappforcomparison.conf (or other external
92 +# configuration file that you set up manually) take precedence
93 +# over this when using ConfigLoader. Thus configuration
94 +# details given here can function as a default configuration,
95 +# with an external configuration file acting as an override for
98 +__PACKAGE__->config( name => 'TestAppForComparison' );
100 +# Start the application
101 +__PACKAGE__->setup();
106 +TestAppForComparison - Catalyst based application
110 + script/testappforcomparison_server.pl
114 +[enter your description here]
118 +L<TestAppForComparison::Controller::Root>, L<Catalyst>
126 +This library is free software. You can redistribute it and/or modify
127 +it under the same terms as Perl itself.
132 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/Makefile.PL 1969-12-31 17:00:00.000000000 -0700
133 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/Makefile.PL 2009-06-15 15:59:41.000000000 -0600
136 +# IMPORTANT: if you delete this file your app will not work as
137 +# expected. You have been warned.
138 +use inc::Module::Install;
140 +name 'TestAppForComparison';
141 +all_from 'lib/TestAppForComparison.pm';
143 +requires 'Catalyst::Runtime' => '5.80004';
144 +requires 'Catalyst::Plugin::ConfigLoader';
145 +requires 'Catalyst::Plugin::Static::Simple';
146 +requires 'Catalyst::Action::RenderView';
148 +requires 'Config::General'; # This should reflect the config file format you've chosen
149 + # See Catalyst::Plugin::ConfigLoader for supported formats
152 +install_script glob('script/*.pl');
155 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/README 1969-12-31 17:00:00.000000000 -0700
156 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/README 2009-06-15 15:59:41.000000000 -0600
158 +Run script/testappforcomparison_server.pl to test the application.
159 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/script/testappforcomparison_cgi.pl 1969-12-31 17:00:00.000000000 -0700
160 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/script/testappforcomparison_cgi.pl 2009-06-15 15:59:41.000000000 -0600
164 +BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
169 +use lib "$FindBin::Bin/../lib";
170 +use TestAppForComparison;
172 +TestAppForComparison->run;
178 +testappforcomparison_cgi.pl - Catalyst CGI
182 +See L<Catalyst::Manual>
186 +Run a Catalyst application as a cgi script.
190 +Catalyst Contributors, see Catalyst.pm
195 +This library is free software. You can redistribute it and/or modify
196 +it under the same terms as Perl itself.
199 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/script/testappforcomparison_create.pl 1969-12-31 17:00:00.000000000 -0700
200 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/script/testappforcomparison_create.pl 2009-06-15 15:59:41.000000000 -0600
208 +eval "use Catalyst::Helper;";
212 +To use the Catalyst development tools including catalyst.pl and the
213 +generated script/myapp_create.pl you need Catalyst::Helper, which is
214 +part of the Catalyst-Devel distribution. Please install this via a
215 +vendor package or by running one of -
217 + perl -MCPAN -e 'install Catalyst::Devel'
218 + perl -MCPANPLUS -e 'install Catalyst::Devel'
227 + 'nonew|force' => \$force,
228 + 'mech|mechanize' => \$mech,
232 +pod2usage(1) if ( $help || !$ARGV[0] );
234 +my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
236 +pod2usage(1) unless $helper->mk_component( 'TestAppForComparison', @ARGV );
242 +testappforcomparison_create.pl - Create a new Catalyst Component
246 +testappforcomparison_create.pl [options] model|view|controller name [helper] [options]
249 + -force don't create a .new file where a file to be created exists
250 + -mechanize use Test::WWW::Mechanize::Catalyst for tests if available
251 + -help display this help and exits
254 + testappforcomparison_create.pl controller My::Controller
255 + testappforcomparison_create.pl -mechanize controller My::Controller
256 + testappforcomparison_create.pl view My::View
257 + testappforcomparison_create.pl view MyView TT
258 + testappforcomparison_create.pl view TT TT
259 + testappforcomparison_create.pl model My::Model
260 + testappforcomparison_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
261 + dbi:SQLite:/tmp/my.db
262 + testappforcomparison_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
263 + dbi:Pg:dbname=foo root 4321
266 + perldoc Catalyst::Manual
267 + perldoc Catalyst::Manual::Intro
271 +Create a new Catalyst Component.
273 +Existing component files are not overwritten. If any of the component files
274 +to be created already exist the file will be written with a '.new' suffix.
275 +This behavior can be suppressed with the C<-force> option.
279 +Catalyst Contributors, see Catalyst.pm
283 +This library is free software. You can redistribute it and/or modify
284 +it under the same terms as Perl itself.
287 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/script/testappforcomparison_fastcgi.pl 1969-12-31 17:00:00.000000000 -0700
288 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/script/testappforcomparison_fastcgi.pl 2009-06-15 15:59:41.000000000 -0600
292 +BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
299 +use lib "$FindBin::Bin/../lib";
300 +use TestAppForComparison;
303 +my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr );
306 + 'help|?' => \$help,
307 + 'listen|l=s' => \$listen,
308 + 'nproc|n=i' => \$nproc,
309 + 'pidfile|p=s' => \$pidfile,
310 + 'manager|M=s' => \$manager,
311 + 'daemon|d' => \$detach,
312 + 'keeperr|e' => \$keep_stderr,
315 +pod2usage(1) if $help;
317 +TestAppForComparison->run(
320 + pidfile => $pidfile,
321 + manager => $manager,
323 + keep_stderr => $keep_stderr,
331 +testappforcomparison_fastcgi.pl - Catalyst FastCGI
335 +testappforcomparison_fastcgi.pl [options]
338 + -? -help display this help and exits
339 + -l -listen Socket path to listen on
340 + (defaults to standard input)
341 + can be HOST:PORT, :PORT or a
343 + -n -nproc specify number of processes to keep
344 + to serve requests (defaults to 1,
346 + -p -pidfile specify filename for pid file
348 + -d -daemon daemonize (requires -listen)
349 + -M -manager specify alternate process manager
350 + (FCGI::ProcManager sub-class)
351 + or empty string to disable
352 + -e -keeperr send error messages to STDOUT, not
357 +Run a Catalyst application as fastcgi.
361 +Catalyst Contributors, see Catalyst.pm
365 +This library is free software. You can redistribute it and/or modify
366 +it under the same terms as Perl itself.
369 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/script/testappforcomparison_server.pl 1969-12-31 17:00:00.000000000 -0700
370 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/script/testappforcomparison_server.pl 2009-06-15 15:59:41.000000000 -0600
375 + $ENV{CATALYST_ENGINE} ||= 'HTTP';
376 + $ENV{CATALYST_SCRIPT_GEN} = 38;
377 + require Catalyst::Engine::HTTP;
385 +use lib "$FindBin::Bin/../lib";
391 +my $port = $ENV{TESTAPPFORCOMPARISON_PORT} || $ENV{CATALYST_PORT} || 3000;
393 +my $restart = $ENV{TESTAPPFORCOMPARISON_RELOAD} || $ENV{CATALYST_RELOAD} || 0;
395 +my $pidfile = undef;
399 +my $watch_directory;
400 +my $follow_symlinks;
405 + 'debug|d' => \$debug,
406 + 'fork|f' => \$fork,
407 + 'help|?' => \$help,
408 + 'host=s' => \$host,
409 + 'port|p=s' => \$port,
410 + 'keepalive|k' => \$keepalive,
411 + 'restart|r' => \$restart,
412 + 'restartdelay|rd=s' => \$check_interval,
413 + 'restartregex|rr=s' => \$file_regex,
414 + 'restartdirectory=s@' => \$watch_directory,
415 + 'followsymlinks' => \$follow_symlinks,
416 + 'background' => \$background,
417 + 'pidfile=s' => \$pidfile,
420 +pod2usage(1) if $help;
423 + $ENV{CATALYST_DEBUG} = 1;
426 +# If we load this here, then in the case of a restarter, it does not
427 +# need to be reloaded for each restart.
430 +# If this isn't done, then the Catalyst::Devel tests for the restarter
432 +$| = 1 if $ENV{HARNESS_ACTIVE};
435 + # This is require instead of use so that the above environment
436 + # variables can be set at runtime.
437 + require TestAppForComparison;
439 + TestAppForComparison->run(
444 + keepalive => $keepalive,
445 + background => $background,
446 + pidfile => $pidfile,
452 + die "Cannot run in the background and also watch for changed files.\n"
455 + require Catalyst::Restarter;
457 + my $subclass = Catalyst::Restarter->pick_subclass;
460 + $args{follow_symlinks} = 1
461 + if $follow_symlinks;
462 + $args{directories} = $watch_directory
463 + if defined $watch_directory;
464 + $args{sleep_interval} = $check_interval
465 + if defined $check_interval;
466 + $args{filter} = qr/$file_regex/
467 + if defined $file_regex;
469 + my $restarter = $subclass->new(
471 + start_sub => $runner,
474 + $restarter->run_and_watch;
484 +testappforcomparison_server.pl - Catalyst Testserver
488 +testappforcomparison_server.pl [options]
491 + -d -debug force debug mode
492 + -f -fork handle each request in a new process
493 + (defaults to false)
494 + -? -help display this help and exits
495 + -host host (defaults to all)
496 + -p -port port (defaults to 3000)
497 + -k -keepalive enable keep-alive connections
498 + -r -restart restart when files get modified
499 + (defaults to false)
500 + -rd -restartdelay delay between file checks
501 + (ignored if you have Linux::Inotify2 installed)
502 + -rr -restartregex regex match files that trigger
503 + a restart when modified
504 + (defaults to '\.yml$|\.yaml$|\.conf|\.pm$')
505 + -restartdirectory the directory to search for
506 + modified files, can be set mulitple times
507 + (defaults to '[SCRIPT_DIR]/..')
508 + -follow_symlinks follow symlinks in search directories
509 + (defaults to false. this is a no-op on Win32)
510 + -background run the process in the background
511 + -pidfile specify filename for pid file
514 + perldoc Catalyst::Manual
515 + perldoc Catalyst::Manual::Intro
519 +Run a Catalyst Testserver for this application.
523 +Catalyst Contributors, see Catalyst.pm
527 +This library is free software. You can redistribute it and/or modify
528 +it under the same terms as Perl itself.
531 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/script/testappforcomparison_test.pl 1969-12-31 17:00:00.000000000 -0700
532 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/script/testappforcomparison_test.pl 2009-06-15 15:59:41.000000000 -0600
541 +use lib "$FindBin::Bin/../lib";
542 +use Catalyst::Test 'TestAppForComparison';
546 +GetOptions( 'help|?' => \$help );
548 +pod2usage(1) if ( $help || !$ARGV[0] );
550 +print request($ARGV[0])->content . "\n";
556 +testappforcomparison_test.pl - Catalyst Test
560 +testappforcomparison_test.pl [options] uri
563 + -help display this help and exits
566 + testappforcomparison_test.pl http://localhost/some_action
567 + testappforcomparison_test.pl /some_action
570 + perldoc Catalyst::Manual
571 + perldoc Catalyst::Manual::Intro
575 +Run a Catalyst action from the command line.
579 +Catalyst Contributors, see Catalyst.pm
583 +This library is free software. You can redistribute it and/or modify
584 +it under the same terms as Perl itself.
587 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/t/01app.t 1969-12-31 17:00:00.000000000 -0700
588 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/t/01app.t 2009-06-15 15:59:41.000000000 -0600
593 +use Test::More tests => 2;
595 +BEGIN { use_ok 'Catalyst::Test', 'TestAppForComparison' }
596 +my $req = request('/');
597 +ok( $req->is_success, "Request succeeds");
598 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/t/02pod.t 1969-12-31 17:00:00.000000000 -0700
599 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/t/02pod.t 2009-06-15 15:59:41.000000000 -0600
606 +eval "use Test::Pod 1.14";
607 +plan skip_all => 'Test::Pod 1.14 required' if $@;
608 +plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
611 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/t/03podcoverage.t 1969-12-31 17:00:00.000000000 -0700
612 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/t/03podcoverage.t 2009-06-15 15:59:41.000000000 -0600
619 +eval "use Test::Pod::Coverage 1.04";
620 +plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
621 +plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
623 +all_pod_coverage_ok();
624 --- /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/TestAppForComparison/testappforcomparison.conf 1969-12-31 17:00:00.000000000 -0700
625 +++ /home/devin/web-devel/Catalyst-Devel/1.00/branches/helper_refactor/t/../TestAppForComparison/testappforcomparison.conf 2009-06-15 15:59:41.000000000 -0600
627 +# rename this file to TestAppForComparison.yml and put a ':' in front of 'name' if
628 +# you want to use YAML like in old versions of Catalyst
629 +name TestAppForComparison