CAS::Apache::AdminForms - The great new CAS::Apache::UserForms!


CAS-Apache documentation Contained in the CAS-Apache distribution.

Index


Code Index:

NAME

Top

CAS::Apache::AdminForms - The great new CAS::Apache::UserForms!

VERSION

Top

Version 0.01

SYNOPSIS

Top

Quick summary of what the module does.

Perhaps a little code snippet.

    use CAS::Apache::UserForms;

    my $foo = CAS::Apache::UserForms->new();
    ...

EXPORT

Top

A list of functions that can be exported. You can delete this section if you don't export anything, such as for a purely object-oriented module.

FUNCTIONS

Top

function1

AUTHOR

Top

Sean P. Quinlan, <gilant at gmail.com>

BUGS

Top

Please report any bugs or feature requests to bug-cas-apache-userforms at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CAS-Apache. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc CAS::Apache

You can also look for information at:

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/CAS-Apache

* CPAN Ratings

http://cpanratings.perl.org/d/CAS-Apache

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=CAS-Apache

* Search CPAN

http://search.cpan.org/dist/CAS-Apache

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


CAS-Apache documentation Contained in the CAS-Apache distribution.
package CAS::Apache::AdminForms;

use warnings FATAL => 'all', NONFATAL => 'redefine';
use strict;

our $VERSION = '0.01';
use Apache2::Const qw(OK SERVER_ERROR REDIRECT);
use base qw(CAS::Apache);
use CAS::Apache::Auth ();


sub handler {
	my $apache2 = shift;
	die unless ref $apache2;
	
	my $request = $apache2->uri();
	die unless $request;
	
	$request =~ m{/(\w+)$};
	my $page = $1;
	unless ($page) {
		die "Unable to determine page requested in $request";
	} # unless it's a CAS page
	my $CR_gen_response = \&{$page};
	unless (defined &$CR_gen_response) {
		die "$page is not available through __PACKAGE__";
	} # see if method is defined in this namespace
	
	# $apache2->unparsed_uri to find args
	$apache2->content_type('text/html');
	
	my ($status, $html) = &$CR_gen_response($apache2);
	return $status unless $status == OK;
	
	print $html;
#	warn "HTML printed\n";
	return OK;
} # handler


sub users {
	my $apache2 = shift;
	my $cgi = CGI->new;
	
	my $html = $cgi->start_html("Foo");
	$html .= <<HTML;
<h1>Bar</h1>
HTML
	
	$html .= $cgi->end_html;
	return (OK, $html);
} # users


sub add_client {
	my $apache2 = shift;
	my $cgi = CGI->new;
	
	my $html = $cgi->start_html("Foo");
	$html .= <<HTML;
<h1>Bar</h1>
HTML
	
	$html .= $cgi->end_html;
	return (OK, $html);
} # add_client


sub edit_client {
	my $apache2 = shift;
	my $cgi = CGI->new;
	
	my $html = $cgi->start_html("Foo");
	$html .= <<HTML;
<h1>Bar</h1>
HTML
	
	$html .= $cgi->end_html;
	return (OK, $html);
} # edit_client


sub permissions {
	my $apache2 = shift;
	my $cgi = CGI->new;
	
	my $html = $cgi->start_html("Foo");
	$html .= <<HTML;
<h1>Bar</h1>
HTML
	
	$html .= $cgi->end_html;
	return (OK, $html);
} # permissions


sub groups {
	my $apache2 = shift;
	my $cgi = CGI->new;
	
	my $html = $cgi->start_html("Foo");
	$html .= <<HTML;
<h1>Bar</h1>
HTML
	
	$html .= $cgi->end_html;
	return (OK, $html);
} # groups


1; # End of CAS::Apache::UserForms