Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanez committed Oct 29, 2009
0 parents commit c19a45a
Show file tree
Hide file tree
Showing 38 changed files with 1,318 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This file documents the revision history for Perl extension mtcatalyst.

0.01 2009-05-31 23:20:35
- initial revision, generated by Catalyst
19 changes: 19 additions & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# IMPORTANT: if you delete this file your app will not work as
# expected. you have been warned
use inc::Module::Install;

name 'mtcatalyst';
all_from 'lib/mtcatalyst.pm';

requires 'Catalyst::Runtime' => '5.80003';
requires 'Catalyst::Plugin::ConfigLoader';
requires 'Catalyst::Plugin::Static::Simple';
requires 'Catalyst::Action::RenderView';
requires 'parent';
requires 'Config::General'; # 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;
3 changes: 3 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Run script/mtcatalyst_server.pl to test the application.

see http://gist.github.com/122656 for lib/MT/Bootstrap.pm diff
64 changes: 64 additions & 0 deletions lib/mtcatalyst.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package mtcatalyst;

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 Config::General file in the
# application's home directory
# Static::Simple: will serve static files from the application's root
# directory

use parent qw/Catalyst/;
use Catalyst qw/
ConfigLoader
/;
our $VERSION = '0.01';

# Configure the application.
#
# Note that settings in mtcatalyst.conf (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 an external configuration file acting as an override for
# local deployment.

__PACKAGE__->config( name => 'mtcatalyst' );

# Start the application
__PACKAGE__->setup();


=head1 NAME
mtcatalyst - Catalyst based application
=head1 SYNOPSIS
script/mtcatalyst_server.pl
=head1 DESCRIPTION
[enter your description here]
=head1 SEE ALSO
L<mtcatalyst::Controller::Root>, L<Catalyst>
=head1 AUTHOR
Justin Hunter
=head1 LICENSE
This library is free software. You can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

1;
34 changes: 34 additions & 0 deletions lib/mtcatalyst/Controller/Root.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package mtcatalyst::Controller::Root;
use Moose;
BEGIN { extends 'Catalyst::Controller::CGIBin' }

=head1 NAME
mtcatalyst::Controller::Root - Catalyst Controller
=head1 DESCRIPTION
Catalyst Controller.
=head1 METHODS
=cut

__PACKAGE__->config->{CGI}{pass_env} = [ qw{PERL5LIB PATH /^MTCATALYST_/ MT_CONFIG MT_HOME} ];
__PACKAGE__->config->{CGI}{username_field} = 'username';

$ENV{MT_HOME} = '/var/www/blog.warpedreality.org';
$ENV{MT_CONFIG} = '/var/www/blog.warpedreality.org/mt.cfg';

=head1 AUTHOR
Justin Hunter
=head1 LICENSE
This library is free software. You can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

1;
6 changes: 6 additions & 0 deletions mtcatalyst.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name mtcatalyst

<Controller::Root>
cgi_root_path /
cgi_dir cgi-bin
</Controller::Root>
12 changes: 12 additions & 0 deletions root/cgi-bin/mt-add-notify.cgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/perl -w

# Movable Type (r) Open Source (C) 2001-2009 Six Apart, Ltd.
# This program is distributed under the terms of the
# GNU General Public License, version 2.
#
# $Id: mt-add-notify.cgi 3455 2009-02-23 02:29:31Z auno $

use strict;
use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
#use MT::Bootstrap App => 'MT::App::NotifyList';
require MT::Bootstrap; MT::Bootstrap->import(App => 'MT::App::NotifyList');
12 changes: 12 additions & 0 deletions root/cgi-bin/mt-atom.cgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/perl -w

# Movable Type (r) Open Source (C) 2001-2009 Six Apart, Ltd.
# This program is distributed under the terms of the
# GNU General Public License, version 2.
#
# $Id: mt-atom.cgi 3455 2009-02-23 02:29:31Z auno $

use strict;
use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
#use MT::Bootstrap App => 'MT::AtomServer';
require MT::Bootstrap; MT::Bootstrap->import(App => 'MT::App::AtomServer');
Loading

0 comments on commit c19a45a

Please sign in to comment.