Chop stuff out
Tomas Doran [Mon, 16 Aug 2010 17:57:53 +0000 (17:57 +0000)]
t/lib/Test-Session-Broken/lib/Test/LDAP.pm
t/lib/Test-Session-Broken/lib/Test/LDAP/Controller/Auth.pm
t/lib/Test-Session-Broken/lib/Test/LDAP/Controller/Root.pm
t/lib/Test-Session-Broken/lib/Test/LDAP/Controller/User.pm
t/lib/Test-Session-Broken/lib/Test/LDAP/Model/LDAP.pm

index 1a7f695..4eef8c8 100644 (file)
@@ -4,20 +4,9 @@ use namespace::autoclean;
 
 use Catalyst::Runtime 5.80;
 
-# 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 Catalyst qw/
     -Debug
-    Static::Simple
-    
     Authentication
-    Authorization::Roles
     Session
     Session::State::Cookie
     Session::Store::FastMmap
@@ -26,7 +15,6 @@ use Catalyst qw/
 extends 'Catalyst';
 
 our $VERSION = '0.01';
-$VERSION = eval $VERSION;
 
 # Configure the application.
 #
@@ -56,16 +44,13 @@ __PACKAGE__->config(
                 "store" => {
                     "binddn"                => "anonymous",
                     "bindpw"                => "dontcare",
-        
                     "class"                 => "LDAP",
-    
                     "ldap_server"           => "ldap.test.no",
                     "ldap_server_options"   => { 
                         "timeout" => 30, 
                         "port" => "636", 
                         "scheme" => "ldaps" 
                     },
-    
                     "role_basedn"           => "ou=stavanger,o=test,c=no",
                     "role_field"            => "cn",
                     "role_filter"           => "(&(objectClass=groupOfNames)(member=%s))",
@@ -79,36 +64,6 @@ __PACKAGE__->config(
     }
 );
 
-
-# Start the application
 __PACKAGE__->setup();
 
-
-=head1 NAME
-
-Test::LDAP - Catalyst based application
-
-=head1 SYNOPSIS
-
-    script/test_ldap_web_server.pl
-
-=head1 DESCRIPTION
-
-[enter your description here]
-
-=head1 SEE ALSO
-
-L<Test::LDAP::Controller::Root>, L<Catalyst>
-
-=head1 AUTHOR
-
-root
-
-=head1 LICENSE
-
-This library is free software. You can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
 1;
index 027fc70..7f937e5 100644 (file)
@@ -4,22 +4,6 @@ use namespace::autoclean;
 
 BEGIN {extends 'Catalyst::Controller'; }
 
-=head1 NAME
-
-Test::LDAP::Controller::Auth - Catalyst Controller
-
-=head1 DESCRIPTION
-
-Catalyst Controller.
-
-=head1 METHODS
-
-=cut
-
-
-=head2 index
-
-=cut
 sub index :Path :Args(0) {
     my ( $self, $c ) = @_;
 
@@ -70,17 +54,6 @@ sub logout : Path("logout") {
     $c->response->redirect( $c->uri_for( $c->controller("Root")->action_for("index") ) )
 }
 
-=head1 AUTHOR
-
-root
-
-=head1 LICENSE
-
-This library is free software. You can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
 __PACKAGE__->meta->make_immutable;
 
 1;
index 36757b6..62ba390 100644 (file)
@@ -4,40 +4,14 @@ use namespace::autoclean;
 
 BEGIN { extends '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
-
-Test::LDAP::Controller::Root - Root Controller for Test::LDAP
-
-=head1 DESCRIPTION
-
-[enter your description here]
-
-=head1 METHODS
-
-=head2 itndex
-
-The root page (/)
-
-=cut
-
 sub index :Path :Args(0) {
     my ( $self, $c ) = @_;
 
     $c->res->body("Index");
 }
 
-=head2 default
-
-Standard 404 error page
-
-=cut
-
 sub default :Path {
     my ( $self, $c ) = @_;
 
@@ -45,33 +19,7 @@ sub default :Path {
     $c->res->status(404);
 }
 
-=head2 end
-
-Attempt to render a view, if needed.
-
-=cut
-
-sub end : ActionClass('RenderView') {
-    my ($self, $c) = @_;
-    my $errors = scalar @{$c->error};
-
-    if ($errors) {
-        $c->res->body("Internal error");
-        $c->res->status("500");
-        $c->clear_errors;
-    }
-}
-
-=head1 AUTHOR
-
-root
-
-=head1 LICENSE
-
-This library is free software. You can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
+sub end {}
 
 __PACKAGE__->meta->make_immutable;
 
index b466729..8ebe829 100644 (file)
@@ -2,24 +2,7 @@ package Test::LDAP::Controller::User;
 use Moose;
 use namespace::autoclean;
 
-BEGIN {extends 'Catalyst::Controller::HTML::FormFu'; }
-
-=head1 NAME
-
-Test::LDAP::Controller::User - Catalyst Controller
-
-=head1 DESCRIPTION
-
-Catalyst Controller.
-
-=head1 METHODS
-
-=cut
-
-
-=head2 index
-
-=cut
+BEGIN {extends 'Catalyst::Controller'; }
 
 sub base :Chained('/') :PathPart('user') :CaptureArgs(0) {
     my ($self, $c) = @_;
@@ -91,11 +74,6 @@ sub edit :Chained('user') :PathPart('edit') :Args(0)  {
     }
 }
 
-=head2 auto
-
-Check if the user is authenicated, if not we just forward to the login page.
-
-=cut
 sub auto :Private {
     my ( $self, $c ) = @_;
 
@@ -110,18 +88,6 @@ sub auto :Private {
     return 1
 }
 
-
-=head1 AUTHOR
-
-root
-
-=head1 LICENSE
-
-This library is free software. You can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
 __PACKAGE__->meta->make_immutable;
 
 1;
index 25a7544..54d912e 100644 (file)
@@ -3,3 +3,6 @@ package Test::LDAP::Model::LDAP;
 use Moose;
 use namespace::autoclean;
 extends 'Catalyst::Model::LDAP::FromAuthentication';
+
+1;
+