SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-CGI-Prototype rpm build for : openSUSE Tumbleweed. For other distributions click perl-CGI-Prototype.

Name : perl-CGI-Prototype
Version : 0.9054 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : 6.2 Date : 2015-06-09 04:50:14
Group : Development/Libraries/Perl Source RPM : perl-CGI-Prototype-0.9054-6.2.src.rpm
Size : 0.04 MB
Packager : (none)
Summary : Create a CGI application by subclassing
Description :
The core of every CGI application seems to be roughly the same:

* *

Analyze the incoming parameters, cookies, and URLs to determine the state
of the application (let\'s call this \"dispatch\").

* *

Based on the current state, analyze the incoming parameters to respond to
any form submitted (\"respond\").

* *

From there, decide what response page should be generated, and produce it
(\"render\").

the CGI::Prototype manpage creates a \'Class::Prototyped\' engine for doing
all this, with the right amount of callback hooks to customize the process.
Because I\'m biased toward Template Toolkit for rendering HTML, I\'ve also
integrated that as my rendering engine of choice. And, being a fan of clean
MVC designs, the classes become the controllers, and the templates become
the views, with clean separation of responsibilities, and \'CGI::Prototype\'
a sort of \"archetypal\" controller.

You can create the null application by simply _activating_ it:

use CGI::Prototype;
CGI::Prototype->activate;

But this won\'t be very interesting. You\'ll want to subclass this class in a
\'Class::Prototyped\'-style manner to override most of its behavior. Slots
can be added to add or alter behavior. You can subclass your subclasses
when groups of your CGI pages share similar behavior. The possibilities are
mind-boggling.

Within the templates, \'self\' refers to the current controller. Thus, you
can define callbacks trivially. In your template, if you need some data,
you can pull it as a request:

[% my_data = self.get_some_big_data %]

which is supplied by simply adding the same slot (method or data) in the
controlling class:

sub get_some_big_data {
my $self = shift;
return $self->some_other_method(size => \'big\');
}

And since the classes are hierarchical, you can start out with an
implementation for one page, then move it to a region or globally quickly.

Although the name \'CGI::Prototype\' implies a CGI protocol, I see no reason
that this would not work with \'Apache::Registry\' in a \'mod_perl\'
environment, or a direct content handler such as:

package My::App;
use base CGI::Prototype;
sub handler {
__PACKAGE__->activate;
}

Note that the \'$r\' request object will have to be created if needed if you
use this approach.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-C/openSUSE_Tumbleweed/noarch

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-CGI-Prototype-0.9054-6.2.noarch.rpm
     

Provides :
perl(CGI::Prototype)
perl(CGI::Prototype::Hidden)
perl-CGI-Prototype

Requires :
perl(Template)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
perl(Class::Prototyped)
rpmlib(PayloadIsLzma) <= 4.4.6-1
perl(:MODULE_COMPAT_5.20.1)


Content of RPM :
/usr/lib/perl5/vendor_perl/5.20.1/CGI
/usr/lib/perl5/vendor_perl/5.20.1/CGI/Prototype
/usr/lib/perl5/vendor_perl/5.20.1/CGI/Prototype.pm
/usr/lib/perl5/vendor_perl/5.20.1/CGI/Prototype/Hidden.pm
/usr/lib/perl5/vendor_perl/5.20.1/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-CGI-Prototype
/usr/share/doc/packages/perl-CGI-Prototype/Changes
/usr/share/doc/packages/perl-CGI-Prototype/README
/usr/share/doc/packages/perl-CGI-Prototype/TODO
/usr/share/man/man3/CGI::Prototype.3pm.gz
/usr/share/man/man3/CGI::Prototype::Hidden.3pm.gz

 
ICM