Browse files

old stuff I forgot to commit apparently

  • Loading branch information...
1 parent 42eef44 commit 50f2c27c3147ea327f8dba060636501e59a9ba9c @jhannah committed Aug 13, 2010
Showing with 543 additions and 0 deletions.
  1. BIN doubi/shef/shef/0/5/b/1/2/2/9/0/05b12290bb5223f3826faeef8c5f4352bb0972a4
  2. BIN doubi/shef/shef/0/6/d/c/1/c/3/6/06dc1c3627103d3c772062a623700e023edf765b
  3. BIN doubi/shef/shef/4/0/6/3/2/d/2/7/40632d27e3183bcff1f28084232f94b488e7ff11
  4. BIN doubi/shef/shef/6/b/e/8/6/2/d/a/6be862daf9e54bf2c6d17e2edf1ab91166cc4e77
  5. BIN doubi/shef/shef/9/6/4/b/6/b/9/5/964b6b95ce0da204f7ca4ad3c18a4ad0d44aff18
  6. BIN doubi/shef/shef/a/0/b/2/9/5/2/8/a0b29528d8a69dfe3392d28ab21c0d445e24720f
  7. BIN doubi/shef/shef/f/a/a/3/8/9/5/6/faa389564a69ed7503f1de895bd5931950cd1d26
  8. BIN graphviz/DBs.png
  9. BIN graphviz/DR.png
  10. BIN graphviz/TTs.png
  11. +4 −0 xenoterracide/Foo/Changes
  12. +16 −0 xenoterracide/Foo/Makefile.PL
  13. +1 −0 xenoterracide/Foo/README
  14. +2 −0 xenoterracide/Foo/foo.yml
  15. +62 −0 xenoterracide/Foo/lib/Foo.pm
  16. +76 −0 xenoterracide/Foo/lib/Foo/Controller/Root.pm
  17. BIN xenoterracide/Foo/root/favicon.ico
  18. BIN xenoterracide/Foo/root/static/images/btn_120x50_built.png
  19. BIN xenoterracide/Foo/root/static/images/btn_120x50_built_shadow.png
  20. BIN xenoterracide/Foo/root/static/images/btn_120x50_powered.png
  21. BIN xenoterracide/Foo/root/static/images/btn_120x50_powered_shadow.png
  22. BIN xenoterracide/Foo/root/static/images/btn_88x31_built.png
  23. BIN xenoterracide/Foo/root/static/images/btn_88x31_built_shadow.png
  24. BIN xenoterracide/Foo/root/static/images/btn_88x31_powered.png
  25. BIN xenoterracide/Foo/root/static/images/btn_88x31_powered_shadow.png
  26. BIN xenoterracide/Foo/root/static/images/catalyst_logo.png
  27. +37 −0 xenoterracide/Foo/script/foo_cgi.pl
  28. +75 −0 xenoterracide/Foo/script/foo_create.pl
  29. +80 −0 xenoterracide/Foo/script/foo_fastcgi.pl
  30. +111 −0 xenoterracide/Foo/script/foo_server.pl
  31. +54 −0 xenoterracide/Foo/script/foo_test.pl
  32. +7 −0 xenoterracide/Foo/t/01app.t
  33. +9 −0 xenoterracide/Foo/t/02pod.t
  34. +9 −0 xenoterracide/Foo/t/03podcoverage.t
View
BIN doubi/shef/shef/0/5/b/1/2/2/9/0/05b12290bb5223f3826faeef8c5f4352bb0972a4
Binary file not shown.
View
BIN doubi/shef/shef/0/6/d/c/1/c/3/6/06dc1c3627103d3c772062a623700e023edf765b
Binary file not shown.
View
BIN doubi/shef/shef/4/0/6/3/2/d/2/7/40632d27e3183bcff1f28084232f94b488e7ff11
Binary file not shown.
View
BIN doubi/shef/shef/6/b/e/8/6/2/d/a/6be862daf9e54bf2c6d17e2edf1ab91166cc4e77
Binary file not shown.
View
BIN doubi/shef/shef/9/6/4/b/6/b/9/5/964b6b95ce0da204f7ca4ad3c18a4ad0d44aff18
Binary file not shown.
View
BIN doubi/shef/shef/a/0/b/2/9/5/2/8/a0b29528d8a69dfe3392d28ab21c0d445e24720f
Binary file not shown.
View
BIN doubi/shef/shef/f/a/a/3/8/9/5/6/faa389564a69ed7503f1de895bd5931950cd1d26
Binary file not shown.
View
BIN graphviz/DBs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN graphviz/DR.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN graphviz/TTs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 xenoterracide/Foo/Changes
@@ -0,0 +1,4 @@
+This file documents the revision history for Perl extension Foo.
+
+0.01 2009-12-29 20:03:22
+ - initial revision, generated by Catalyst
View
16 xenoterracide/Foo/Makefile.PL
@@ -0,0 +1,16 @@
+use inc::Module::Install;
+
+name 'Foo';
+all_from 'lib/Foo.pm';
+
+requires 'Catalyst::Runtime' => '5.80012';
+requires 'Catalyst::Plugin::ConfigLoader';
+requires 'Catalyst::Plugin::Static::Simple';
+requires 'Catalyst::Action::RenderView';
+requires 'YAML'; # This should reflect the config file format you've chosen
+ # See Catalyst::Plugin::ConfigLoader for supported formats
+catalyst;
+
+install_script glob('script/*.pl');
+auto_install;
+WriteAll;
View
1 xenoterracide/Foo/README
@@ -0,0 +1 @@
+Run script/foo_server.pl to test the application.
View
2 xenoterracide/Foo/foo.yml
@@ -0,0 +1,2 @@
+---
+name: Foo
View
62 xenoterracide/Foo/lib/Foo.pm
@@ -0,0 +1,62 @@
+package Foo;
+
+use strict;
+use warnings;
+
+use Catalyst::Runtime '5.70';
+
+# Set flags and add plugins for the application
+#
+# -Debug: activates the debug mode for very useful log messages
+# ConfigLoader: will load the configuration from a YAML file in the
+# application's home directory
+# Static::Simple: will serve static files from the application's root
+# directory
+
+use Catalyst qw/-Debug ConfigLoader Static::Simple/;
+
+our $VERSION = '0.01';
+
+# Configure the application.
+#
+# Note that settings in foo.yml (or other external
+# configuration file that you set up manually) take precedence
+# over this when using ConfigLoader. Thus configuration
+# details given here can function as a default configuration,
+# with a external configuration file acting as an override for
+# local deployment.
+
+__PACKAGE__->config( name => 'Foo' );
+
+# Start the application
+__PACKAGE__->setup;
+
+
+=head1 NAME
+
+Foo - Catalyst based application
+
+=head1 SYNOPSIS
+
+ script/foo_server.pl
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 SEE ALSO
+
+L<Foo::Controller::Root>, L<Catalyst>
+
+=head1 AUTHOR
+
+Catalyst developer
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
View
76 xenoterracide/Foo/lib/Foo/Controller/Root.pm
@@ -0,0 +1,76 @@
+package Foo::Controller::Root;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+#
+# Sets the actions in this controller to be registered with no prefix
+# so they function identically to actions created in MyApp.pm
+#
+__PACKAGE__->config->{namespace} = '';
+
+=head1 NAME
+
+Foo::Controller::Root - Root Controller for Foo
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 METHODS
+
+=cut
+
+=head2 default
+
+=cut
+
+sub default : Private {
+ my ( $self, $c ) = @_;
+
+ # Hello World
+ $c->response->body( $c->welcome_message );
+}
+
+sub foo : Local {
+ my ($self, $c) = @_;
+ $DB::single = 1;
+ my @methods = $self->get_action_methods();
+ my %all;
+ foreach my $m (@methods) {
+ if ($m->{associated_metaclass} && $m->{associated_metaclass}->{methods}) {
+ foreach my $m (keys %{$m->{associated_metaclass}->{methods}}) {
+ $all{$m} = 1 unless ($m =~ /^_/);
+ }
+ }
+ }
+ foreach my $m (keys %all) {
+ $c->log->debug($m);
+ }
+ 1;
+}
+sub bar : Local { }
+sub baz : Local { }
+
+
+=head2 end
+
+Attempt to render a view, if needed.
+
+=cut
+
+sub end : ActionClass('RenderView') {}
+
+=head1 AUTHOR
+
+Catalyst developer
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
View
BIN xenoterracide/Foo/root/favicon.ico
Binary file not shown.
View
BIN xenoterracide/Foo/root/static/images/btn_120x50_built.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN xenoterracide/Foo/root/static/images/btn_120x50_built_shadow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN xenoterracide/Foo/root/static/images/btn_120x50_powered.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN xenoterracide/Foo/root/static/images/btn_120x50_powered_shadow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN xenoterracide/Foo/root/static/images/btn_88x31_built.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN xenoterracide/Foo/root/static/images/btn_88x31_built_shadow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN xenoterracide/Foo/root/static/images/btn_88x31_powered.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN xenoterracide/Foo/root/static/images/btn_88x31_powered_shadow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN xenoterracide/Foo/root/static/images/catalyst_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
37 xenoterracide/Foo/script/foo_cgi.pl
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
+
+use strict;
+use warnings;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Foo;
+
+Foo->run;
+
+1;
+
+=head1 NAME
+
+foo_cgi.pl - Catalyst CGI
+
+=head1 SYNOPSIS
+
+See L<Catalyst::Manual>
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as a cgi script.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+
+=head1 COPYRIGHT
+
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
View
75 xenoterracide/Foo/script/foo_create.pl
@@ -0,0 +1,75 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use Catalyst::Helper;
+
+my $force = 0;
+my $mech = 0;
+my $help = 0;
+
+GetOptions(
+ 'nonew|force' => \$force,
+ 'mech|mechanize' => \$mech,
+ 'help|?' => \$help
+ );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
+
+pod2usage(1) unless $helper->mk_component( 'Foo', @ARGV );
+
+1;
+
+=head1 NAME
+
+foo_create.pl - Create a new Catalyst Component
+
+=head1 SYNOPSIS
+
+foo_create.pl [options] model|view|controller name [helper] [options]
+
+ Options:
+ -force don't create a .new file where a file to be created exists
+ -mechanize use Test::WWW::Mechanize::Catalyst for tests if available
+ -help display this help and exits
+
+ Examples:
+ foo_create.pl controller My::Controller
+ foo_create.pl controller My::Controller BindLex
+ foo_create.pl -mechanize controller My::Controller
+ foo_create.pl view My::View
+ foo_create.pl view MyView TT
+ foo_create.pl view TT TT
+ foo_create.pl model My::Model
+ foo_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
+ dbi:SQLite:/tmp/my.db
+ foo_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
+ dbi:Pg:dbname=foo root 4321
+
+ See also:
+ perldoc Catalyst::Manual
+ perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Create a new Catalyst Component.
+
+Existing component files are not overwritten. If any of the component files
+to be created already exist the file will be written with a '.new' suffix.
+This behavior can be suppressed with the C<-force> option.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
View
80 xenoterracide/Foo/script/foo_fastcgi.pl
@@ -0,0 +1,80 @@
+#!/usr/bin/perl -w
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Foo;
+
+my $help = 0;
+my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr );
+
+GetOptions(
+ 'help|?' => \$help,
+ 'listen|l=s' => \$listen,
+ 'nproc|n=i' => \$nproc,
+ 'pidfile|p=s' => \$pidfile,
+ 'manager|M=s' => \$manager,
+ 'daemon|d' => \$detach,
+ 'keeperr|e' => \$keep_stderr,
+);
+
+pod2usage(1) if $help;
+
+Foo->run(
+ $listen,
+ { nproc => $nproc,
+ pidfile => $pidfile,
+ manager => $manager,
+ detach => $detach,
+ keep_stderr => $keep_stderr,
+ }
+);
+
+1;
+
+=head1 NAME
+
+foo_fastcgi.pl - Catalyst FastCGI
+
+=head1 SYNOPSIS
+
+foo_fastcgi.pl [options]
+
+ Options:
+ -? -help display this help and exits
+ -l -listen Socket path to listen on
+ (defaults to standard input)
+ can be HOST:PORT, :PORT or a
+ filesystem path
+ -n -nproc specify number of processes to keep
+ to serve requests (defaults to 1,
+ requires -listen)
+ -p -pidfile specify filename for pid file
+ (requires -listen)
+ -d -daemon daemonize (requires -listen)
+ -M -manager specify alternate process manager
+ (FCGI::ProcManager sub-class)
+ or empty string to disable
+ -e -keeperr send error messages to STDOUT, not
+ to the webserver
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as fastcgi.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
View
111 xenoterracide/Foo/script/foo_server.pl
@@ -0,0 +1,111 @@
+#!/usr/bin/perl -w
+
+BEGIN {
+ $ENV{CATALYST_ENGINE} ||= 'HTTP';
+ $ENV{CATALYST_SCRIPT_GEN} = 30;
+ require Catalyst::Engine::HTTP;
+}
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+my $debug = 0;
+my $fork = 0;
+my $help = 0;
+my $host = undef;
+my $port = $ENV{FOO_PORT} || $ENV{CATALYST_PORT} || 3000;
+my $keepalive = 0;
+my $restart = $ENV{FOO_RELOAD} || $ENV{CATALYST_RELOAD} || 0;
+my $restart_delay = 1;
+my $restart_regex = '\.yml$|\.yaml$|\.pm$';
+my $restart_directory = undef;
+
+my @argv = @ARGV;
+
+GetOptions(
+ 'debug|d' => \$debug,
+ 'fork' => \$fork,
+ 'help|?' => \$help,
+ 'host=s' => \$host,
+ 'port=s' => \$port,
+ 'keepalive|k' => \$keepalive,
+ 'restart|r' => \$restart,
+ 'restartdelay|rd=s' => \$restart_delay,
+ 'restartregex|rr=s' => \$restart_regex,
+ 'restartdirectory=s' => \$restart_directory,
+);
+
+pod2usage(1) if $help;
+
+if ( $restart && $ENV{CATALYST_ENGINE} eq 'HTTP' ) {
+ $ENV{CATALYST_ENGINE} = 'HTTP::Restarter';
+}
+if ( $debug ) {
+ $ENV{CATALYST_DEBUG} = 1;
+}
+
+# This is require instead of use so that the above environment
+# variables can be set at runtime.
+require Foo;
+
+Foo->run( $port, $host, {
+ argv => \@argv,
+ 'fork' => $fork,
+ keepalive => $keepalive,
+ restart => $restart,
+ restart_delay => $restart_delay,
+ restart_regex => qr/$restart_regex/,
+ restart_directory => $restart_directory,
+} );
+
+1;
+
+=head1 NAME
+
+foo_server.pl - Catalyst Testserver
+
+=head1 SYNOPSIS
+
+foo_server.pl [options]
+
+ Options:
+ -d -debug force debug mode
+ -f -fork handle each request in a new process
+ (defaults to false)
+ -? -help display this help and exits
+ -host host (defaults to all)
+ -p -port port (defaults to 3000)
+ -k -keepalive enable keep-alive connections
+ -r -restart restart when files get modified
+ (defaults to false)
+ -rd -restartdelay delay between file checks
+ -rr -restartregex regex match files that trigger
+ a restart when modified
+ (defaults to '\.yml$|\.yaml$|\.pm$')
+ -restartdirectory the directory to search for
+ modified files
+ (defaults to '../')
+
+ See also:
+ perldoc Catalyst::Manual
+ perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst Testserver for this application.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
View
54 xenoterracide/Foo/script/foo_test.pl
@@ -0,0 +1,54 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Catalyst::Test 'Foo';
+
+my $help = 0;
+
+GetOptions( 'help|?' => \$help );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+print request($ARGV[0])->content . "\n";
+
+1;
+
+=head1 NAME
+
+foo_test.pl - Catalyst Test
+
+=head1 SYNOPSIS
+
+foo_test.pl [options] uri
+
+ Options:
+ -help display this help and exits
+
+ Examples:
+ foo_test.pl http://localhost/some_action
+ foo_test.pl /some_action
+
+ See also:
+ perldoc Catalyst::Manual
+ perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst action from the command line.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
View
7 xenoterracide/Foo/t/01app.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+BEGIN { use_ok 'Catalyst::Test', 'Foo' }
+
+ok( request('/')->is_success, 'Request should succeed' );
View
9 xenoterracide/Foo/t/02pod.t
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod 1.14";
+plan skip_all => 'Test::Pod 1.14 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_files_ok();
View
9 xenoterracide/Foo/t/03podcoverage.t
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_coverage_ok();

0 comments on commit 50f2c27

Please sign in to comment.