Main > Free Download Search >

Free cgi entertainment software for linux

cgi entertainment

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 645
CGI::WeT::Theme 0.71

CGI::WeT::Theme 0.71


CGI::WeT::Theme is a Perl module with theme loader for the CGI::WeT package. more>>
CGI::WeT::Theme is a Perl module with theme loader for the CGI::WeT package.

SYNOPSIS

use CGI::WeT::Theme ();

This module provides a well-defined interface between the rendering engine and the theme definition loaders. It is designed to work with or without mod_perl. All theme loader classes must be defined in the CGI::WeT::Theme::Loader namespace during the construction of a CGI::WeT::Theme object.

This module is used by the rendering engine and should not be needed outside of that engine. This documentation is to aid those building a theme loader.

All theme loaders need the following method defined:

factory(theme)

This will produce a properly blessed object which represents the definition for theme. If such an object can not be produced (theme not defined by that particular loader), this will return undef.
The object returned by the factory method must provide the following methods:

page_type(list)

This function will return an object representing the information needed to layout a page of the type in list. Since this is a list, the first item is most desired while the last is least desired. It will return the information for the best desired match it can find. If none can be returned, it must return undef.

The object returned by this function must provide LAYOUT and may provide BODY, CSS, and JAVASCRIPT. LAYOUT provides an anonymous array describing the layout of the page. BODY returns a hash reference describing various body attributes. BODY is deprecated in favor of CSS which returns a reference to an array with the Cascading Style Sheet to use for this layout. JAVASCRIPT returns a reference to an array with any JavaScript required for this layout.

<<less
Download (0.040MB)
Added: 2006-10-06 License: Perl Artistic License Price:
1114 downloads
CGI::SecureState 0.36

CGI::SecureState 0.36


CGI::SecureState is a transparent, secure statefulness for CGI programs. more>>
CGI::SecureState is a transparent, secure statefulness for CGI programs.

SYNOPSIS

use CGI::SecureState;

my @memory = qw(param1 param2 other_params_to_remember);
my $cgi = new CGI::SecureState(-stateDir => "states",
-mindSet => forgetful,
-memory => @memory);

print $cgi->header(), $cgi->start_html;
my $url = $cgi->state_url();
my $param = $cgi->state_param();
print I am a stateful CGI session.";
printI am a different ",
"script that also has access to this session.quot;;

Very Important Note for Users of CGI::SecureState 0.2x

For those still using the 0.2x series, CGI::SecureState changed enormously between 0.26 and 0.30. Specifically, the addition of mindsets is so important that if you run your old scripts unchanged under CGI::SecureState 0.3x, you will receive nasty warnings (likely both in output web pages and your log files) that will tell you not to do so. Please do yourself a favor by re-reading this documentation, as this mysterious mindset business (as well as all the scrumptious new features) will be made clear.

Of course, any and all comments on the changes are welcome. If you are interested, send mail to behroozi@cpan.org with the subject "CGI::SecureState Comment".

A Better Solution to the stateless problem.

HTTP is by nature a stateless protocol; as soon as the requested object is delivered, HTTP severs the objects connection to the client. HTTP retains no memory of the request details and does not relate subsequent requests with what it has already served.

There are a few methods available to deal with this problem, including forms and cookies, but most have problems themselves, including security issues (cookie stealing), browser support (cookie blocking), and painful implementations (forms).

CGI::SecureState solves this problem by storing session data in an encrypted state file on the server. CGI::SecureState is similar in purpose to CGI::Persistent (and retains much of the same user interface) but has a completely different implementation. For those of you who have worked with CGI::Persistent before, you will be pleased to learn that CGI::SecureState was designed to work with Perls taint mode and has worked flawlessly with mod_perl and Apache::Registry for over two years. CGI::SecureState was also designed from the ground up for security, a fact which may rear its ugly head if anybody tries to do something tricksy.

<<less
Download (0.020MB)
Added: 2007-07-16 License: Perl Artistic License Price:
831 downloads
CGIFeed

CGIFeed


CGIFeed is a CGI based feed reader. more>>
CGIFeed is a CGI program that reads news feeds (via XML/RDF/RSS) and prepares HTML pages for them.

You can enter new feeds through the Web page, and edit the name and update interval for each feed.
<<less
Download (0.009MB)
Added: 2005-04-26 License: Free To Use But Restricted Price:
1641 downloads
Firewall Generator 3.0

Firewall Generator 3.0


Firewall Generator is a CGI script that generates a firewall. more>>
Firewall Generator is a CGI script that generates a bash shell script that contains a list of commands for configuring a set of firewall rules.

It is the best solution to know something about system security.
<<less
Download (0.002MB)
Added: 2006-07-13 License: GPL (GNU General Public License) Price:
1206 downloads
CGI::Portable 0.51

CGI::Portable 0.51


CGI::Portable is a framework for server-generic web apps. more>>
CGI::Portable is a framework for server-generic web apps.

SYNOPSIS

Content of thin shell "startup_cgi.pl" for CGI or Apache::Registry env:

#!/usr/bin/perl
use strict;
use warnings;

require CGI::Portable;
my $globals = CGI::Portable->new();

use Cwd;
$globals->file_path_root( cwd() ); # let us default to current working directory
$globals->file_path_delimiter( $^O=~/Mac/i ? ":" : $^O=~/Win/i ? "" : "/" );

$globals->set_prefs( config.pl );
$globals->current_user_path_level( 1 );

require CGI::Portable::AdapterCGI;
my $io = CGI::Portable::AdapterCGI->new();

$io->fetch_user_input( $globals );
$globals->call_component( DemoAardvark );
$io->send_user_output( $globals );

1;

Content of thin shell "startup_socket.pl" for IO::Socket::INET:

#!/usr/bin/perl
use strict;
use warnings;

print "[Server $0 starting up]n";

require CGI::Portable;
my $globals = CGI::Portable->new();

use Cwd;
$globals->file_path_root( cwd() ); # let us default to current working directory
$globals->file_path_delimiter( $^O=~/Mac/i ? ":" : $^O=~/Win/i ? "" : "/" );

$globals->set_prefs( config.pl );
$globals->current_user_path_level( 1 );

require CGI::Portable::AdapterSocket;
my $io = CGI::Portable::AdapterSocket->new();

use IO::Socket;
my $server = IO::Socket::INET->new(
Listen => SOMAXCONN,
LocalAddr => 127.0.0.1,
LocalPort => 1984,
Proto => tcp
);
die "[Error: cant setup server $0]" unless $server;

print "[Server $0 accepting clients]n";

while( my $client = $server->accept() ) {
printf "%s: [Connect from %s]n", scalar localtime, $client->peerhost;

my $content = $globals->make_new_context();

$io->fetch_user_input( $content, $client );
$content->call_component( DemoAardvark );
$io->send_user_output( $content, $client );

close $client;

printf "%s http://%s:%s%s %sn", $content->request_method,
$content->server_domain, $content->server_port,
$content->user_path_string, $content->http_status_code;
}

1;

^The CGI::Portable class is a framework intended to support complex web applications that are easily portable across servers because common environment-specific details are abstracted away, including the file system type, the web server type, and your projects location in the file system or uri hierarchy.

Also abstracted away are details related to how users of your applications arrange instance config/preferences data across single or multiple files, so they get more flexability in how to use your application without you writing the code to support it. So your apps are easier to make data-controlled.

Application cores would use CGI::Portable as an interface to the server they are running under, where they receive user input through it and they return a response (HTML page or other data type) to the user through it. Since CGI::Portable should be able to express all of their user input or output needs, your application cores should run well under CGI or mod_perl or IIS or a Perl-based server or a command line without having code that supports each types individual needs.

That said, CGI::Portable doesnt contain any user input/output code of its own, but allows you to use whatever platform-specific code or modules you wish between it and the actual server. By using my module as an abstraction layer, your own program core doesnt need to know which platform-specific code it is talking to.

As a logical extension to the interfacing functionality, CGI::Portable makes it easier for you to divide your application into autonomous components, each of which acts like it is its own application core with user input and instance config data provided to it and a recepticle for its user output provided. This module would be an interface between the components.

This class has 5 main types of functionality, or sets of properties that exist in parallel but are fully/mostly independant from each other. As such, it could conceptually be split into 5 physical modules, some of which could be used on their own, but they are actually contained in this one module for simplicity of use (just one object for user code to keep track of). The 5 functionality sets could be called: Errors, Files, Request, Response, Misc.

<<less
Download (0.093MB)
Added: 2006-08-01 License: Perl Artistic License Price:
1182 downloads
CGI::Test 0.104

CGI::Test 0.104


CGI::Test is a CGI regression test framework. more>>
CGI::Test is a CGI regression test framework.

SYNOPSIS

# In some t/script.t regression test, for instance
use CGI::Test; # exports ok()

my $ct = CGI::Test->new(
-base_url => "http://some.server:1234/cgi-bin",
-cgi_dir => "/path/to/cgi-bin",
);

my $page = $ct->GET("http://some.server:1234/cgi-bin/script?arg=1");
ok 1, $page->content_type =~ m|text/htmlb|;

my $form = $page->forms->[0];
ok 2, $form->action eq "/cgi-bin/some_target";

my $menu = $form->menu_by_name("months");
ok 3, $menu->is_selected("January");
ok 4, !$menu->is_selected("March");
ok 5, $menu->multiple;

my $send = $form->submit_by_name("send_form");
ok 6, defined $send;

#
# Now interact with the CGI
#

$menu->select("March"); # "click" on the March label
my $answer = $send->press; # "click" on the send button
ok 7, $answer->is_ok; # and make sure we dont get an HTTP error

The CGI::Test module provides a CGI regression test framework which allows you to run your CGI programs offline, i.e. outside a web server, and interact with them programmatically, without the need to type data and click from a web browser.

If youre using the CGI module, you may be familiar with its offline testing mode. However, this mode is appropriate for simple things, and there is no support for conducting a full session with a stateful script. CGI::Test fills this gap by providing the necessary infrastructure to run CGI scripts, then parse the output to construct objects that can be queried, and on which you can interact to "play" with the scripts control widgets, finally submitting data back. And so on...
Note that the CGI scripts you can test with CGI::Test need not be implemented in Perl at all. As far as this framework is concerned, CGI scripts are executables that are run on a CGI-like environment and which produce an output.

To use the CGI::Test framework, you need to configure a CGI::Test object to act like a web server, by providing the URL base where CGI scripts lie on this pseudo-server, and which physical directory corresponds to that URL base.
From then on, you may issue GET and POST requests giving an URL, and the pseudo-server returns a CGI::Test::Page object representing the outcome of the request. This page may be an error, plain text, some binary data, or an HTML page (see CGI::Test::Page for details).

The latter (an HTML page) can contain one or more CGI forms (identified by tags), which are described by instances of CGI::Test::Form objects (see CGI::Test::Form for details).

Forms can be queried to see whether they contain a particular type of widget (menu, text area, button, etc...), of a particular name (thats the CGI parameter name). Once found, one may interact with a widget as the user would from a browser. Widgets are described by polymorphic objects which conform to the CGI::Test::Form::Widget type. The specific interaction that is offered depends on the dynamic type of the object (see CGI::Test::Form::Widget for details).

An interaction with a form ends by a submission of the form data to the server, and getting a reply back. This is done by pressing a submit button, and the press() routine returns a new page. Naturally, no server is contacted at all within the CGI::Test framework, and the CGI script is ran through a proper call to one of the GET/POST method on the CGI::Test object.

Finally, since CGI::Test is meant to be used from regression test scripts, it exports a single ok() routine which merely prints the messages expected by Test::Harness. This is the only functional routine in this module, all other accesses being made through a CGI::Test object.

<<less
Download (0.050MB)
Added: 2007-06-12 License: Perl Artistic License Price:
864 downloads
CGI::Enurl 1.07

CGI::Enurl 1.07


CGI::Enurl.pm is a Perl module for URL-encoding strings and hashes. more>>
CGI::Enurl.pm is a Perl module for URL-encoding strings and hashes.

SYNOPSIS

use CGI::Enurl;
%hash = (name=>Jenda Krynicky,address=>Nerudova 1016);
print "Location: http://$ENV{SERVER_NAME}/cgi-bin/do.pl?",enurl %hash,"nn";

This is a little module made for CGI scripting. It encodes the parameters to be passed to a CGI. It does nothing more, so its much smaller and loads more quickly.

Functions

enurl STRING
enurl ARRAY
enurl HASH

Encodes the parameter. If the parameter is a single string it encodes it and returns the encoded form.

If it is an array or a reference to an array it encodes all items and returns them joined by &.

If it is a hash it encodes the values and return a querystring in form "key2=encoded_value1&key2=encoded_value2&...".

!!! Please note that a hash in a list context returns a list of all keys and values. This means that if you call enurl(%hash) you will NOT get what you may thing you should. You HAVE to use enurl(%hash) !!!

enURL STRING

Encodes the parameter, this version doesnt encode = and & characters, so you should make sure they are not present in the data.

Notice the difference :

enurl a&b=f o o => a%26b%3Df+o+o
enURL a&b=f o o => a&b=f+o+o

$CGI::Enurl::ParamSeparator

You may specify another character to be used as the parameter separator. Simply set this variable to the character (or string) you want to use.
The default value is &

$CGI::Enurl::KeepUnencoded

This variable contains the characters that should stay unencoded. Please keep in mind that the string will be interpolated into a regexp in a [^...] group!

Any change of this variable will be ignored after the first call to enurl or enURL. (Im using /o switch in the regexp.) So if you want to change the variable you should do it as soon as posible. You may do that even before you "use" the module!

The default value is a-zA-Z 0-9_-@.=

<<less
Download (0.004MB)
Added: 2007-07-19 License: Perl Artistic License Price:
828 downloads
CGI::Application::Generator 1.0

CGI::Application::Generator 1.0


CGI::Application::Generator is a Perl module with dynamically build CGI::Application modules. more>>
CGI::Application::Generator is a Perl module with dynamically build CGI::Application modules.

SYNOPSIS

use CGI::Application::Generator;

# Required methods
my $cat = CGI::Application::Generator->new();
$cat->package_name(My::Widget::Browser);
$cat->start_mode(list_widgets);
$cat->run_modes(qw/
list_widgets
add_widget
insert_widget
edit_widget
update_widget
delete_widget
/);


# Optional methods
$cat->base_module(My::CGI::Application);
$cat->use_modules(qw/My::DBICreds My::Utilities/);
$cat->new_dbh_method(My::DBICreds->new_dbh());
$cat->tmpl_path(Path/To/My/Templates/);


# Output-related methods
$cat->app_module_tmpl(my_standard_cgiapp.tmpl);
$cat->output_app_module();

CGI::Application::Generator provides a means by which a CGI::Application module can be created from code, as opposed to being written by hand. The goal of this module is two-fold:

1. To ease the creation of new CGI::Application modules.
2. To allow standardization of CGI::Application coding
styles to be more uniformly applied.

It is also the hope of this module that Computer Assisted Software Engineering (CASE) tools will eventually emerge which will allow the development process for web-based applications to be greatly improved. These CASE tools could more easily convert visual notation (such as UML state-transition diagrams) into method calls to this module, thereby creating actual code.

<<less
Download (0.014MB)
Added: 2007-03-07 License: Perl Artistic License Price:
965 downloads
CGI::Expand 2.02

CGI::Expand 2.02


CGI::Expand is a Perl module that can convert flat hash to nested data using TT2s dot convention. more>>
CGI::Expand is a Perl module that can convert flat hash to nested data using TT2s dot convention.

SYNOPSIS

use CGI::Expand;
use CGI; # or Apache::Request, etc.

$args = expand_cgi( CGI->new(a.0=3&a.2=4&b.c.0=x) );
# $args = { a => [3,undef,4], b => { c => [x] }, }

# Or to catch exceptions:
eval {
$args = expand_cgi( CGI->new(a.0=3&a.2=4&b.c.0=x) );
} or log_and_exit( $@ );

#-----
use CGI::Expand qw(expand_hash);

$args = expand_hash({a.0=>77}); # $args = { a => [ 77 ] }

Converts a CGI query into structured data using a dotted name convention similar to TT2.

expand_cgi works with CGI.pm, Apache::Request or anything with an appropriate "param" method. Or you can use expand_hash directly.

If you prefer to use a different flattening convention then CGI::Expand can be subclassed.

<<less
Download (0.008MB)
Added: 2007-07-07 License: Perl Artistic License Price:
840 downloads
CGI::AppBuilder::Table 0.12

CGI::AppBuilder::Table 0.12


CGI::AppBuilder::Table module contains a configuration initializer. more>>
CGI::AppBuilder::Table module contains a configuration initializer.



SYNOPSIS

use CGI::AppBuilder::Table;

my $ab = CGI::AppBuilder::Table->new(
ifn, my_init.cfg, opt, vhS:a:);
my ($q, $ar, $ar_log) = $ab->start_app($0, %ARGV);
print $ab->disp_form($q, $ar);

This class provides methods for reading and parsing configuration files.

new (ifn => file.cfg, opt => hvS:)

This is a inherited method from CGI::AppBuilder. See the same method in CGI::AppBuilder for more details.

html_table($arf, $cns, $br)

Input variables:

$arf - array ref containing the content of the table
$cns - column names separated by comma or
AUTO|AH|HASH - use $k in AH Array ${$arf}[$i]{$k}
$br - hash array ref for table format, it contains
css_table - CSS class name for < TABLE>
atr_table - attribute parameters for < TABLE>
css_tr - CSS class name for < TR>
atr_tr - attribute parameters for < TR>
atr_tr_odd - attribute parameters for ODD < TR>
atr_tr_even - attribute parameters for EVEN < TR>
css_tr_odd - CSS class name for ODD < TR>
css_tr_even - CSS class name for EVEN < TR>
css_select - CSS class name for < SELECT ...>
css_input - CSS class name for < INPUT type=input ...>
atr_sel - attributes for itemized < SELECT ...> for instance:
atr_sel = {
var1 => style="display:none",
var2 => style="display:block",
var3 => class="FormSel",
}
atr_inp - attributes for itemized < INPUT type=input ...>
css_td - CSS class name for < TD>
atr_td - attribute parameters for < TD>
atr_cell - an array ref to attribute parameters for each cell
${$br}{atr_cell}[$i][$j]
esc_vars - a list of escaped variables separated by comma.
fh_out - output file handler
cns_desc - hash ref containing column name description
tab_caption - table caption/header
tab_footer - table footer/notes

<<less
Download (0.012MB)
Added: 2007-07-19 License: Perl Artistic License Price:
828 downloads
CGI::AppBuilder::Frame 0.10

CGI::AppBuilder::Frame 0.10


CGI::AppBuilder::Frame is a configuration initializer. more>>
CGI::AppBuilder::Frame is a configuration initializer.

SYNOPSIS

use CGI::AppBuilder::Frame;

my $ab = CGI::AppBuilder::Frame- >new(
ifn, my_init.cfg, opt, vhS:a:);
my ($q, $ar, $ar_log) = $ab- >start_app($0, %ARGV);
print $ab- >disp_form($q, $ar);

This class provides methods for reading and parsing configuration files.
new (ifn = > file.cfg, opt = > hvS:)

This is a inherited method from CGI::AppBuilder. See the same method in CGI::AppBuilder for more details.

frame_set ($fr, $pr)

Input variables:

$fr - frame set definiton array reference. The $fr contains two
elements [$hr, $ar]:
$hr - a hash ref containing the frame set attributes
$ar - a array ref containing hash references defining each
frames in the frame set.
$pr - tag attribute array ref. It contains three elements:
class - CSS class name
attr - attribute string such as width=5 onChange=js_func
hr - hash ref with key and value pairs. This will be obtained
from $fr for each frame set and frame.
pretty - whether to add line breaks

Variables used or methods called:

CGI::AppBuilder::Table
html_tag - generate HTML tags
CGI::AppBuilder::Message
echo_msg - display message

How to use:

The following shows how to define the frame array ($fr):

+-+----+ The following defines the left layout:
| | T |
| +----+ [{cols= >"150,*"},[
| | | {src= >"left.htm",name= >"L"},
|L| C | [{rows= >"100,*,50"},[
| | | {src= >"top.htm",name= >"T"},
| |----| {src= >"main.htm",name= >"C"},
| | B | {src= >"bottom.htm",name= >"B"}]]]
+-+----+ ]

In YAML, here is how it looks like:

---
cols: 150,*
- src: left.htm
name: L
- rows: 100,*,50
- src: top.htm
name: T
- src: main.htm
name: C
- src: bottom.htm
name: B
...

+-+------+ The following defines the left layout:
| | T |
| +----+-+ [{cols= >"150,*"},[
| | | | {src= >"left.htm",name= >"L"},
|L| C |R| [{rows= >"100,*,50"},[
| | | | {src= >"top.htm",name= >"T"},
| | | | [{cols= >"*,100"},[
| |----+-+ {src= >"main.htm",name= >"C"},
| | | {src= >"right.htm",name= >"R"}] ] ],
| | B | {src= >"bottom.htm",name= >"B"}]]
+-+----+-+ ]
In YAML, here is how it looks like:
---
cols: 150,*
- src: left.htm
name: L
- rows: 100,*,50
- src: top.htm
name: T
- cols: *,100
- src: main.htm
name: C
- src: right.htm
name: R
- src: bottom.htm
name: B
...
Here is the testing codes:
my $fr = [{cols= >"150,*"},[
{src= >"left.htm",name= >"L"},
[{rows= >"100,*,50"},[
{src= >"top.htm",name= >"T"},
{src= >"main.htm",name= >"C"},
{src= >"bottom.htm",name= >"B"}]
]]
];
my $pr = {pretty= >1};
print $obj- >frame_set($fr,$pr);
# the following is the result:

< FRAMESET cols=150,* >
< FRAME src=left.htm name=L >
< FRAMESET rows=100,*,50 >
< FRAME src=top.htm name=T >
< FRAME src=main.htm name=C >
< FRAME src=bottom.htm name=B >
< / FRAMESET >
< / FRAMESET >

$pr- >{_frameset_count} = 0; # reset frame set counter
my $f2 = [ {cols= >"150,*"},[
{src= >"left.htm",name= >"L"},
[{rows= >"100,*,50"},[
{src= >"top.htm",name= >"T"},
[{cols= >"*,100"},[
{src= >"main.htm",name= >"C"},
{src= >"right.htm",name= >"R"}]
],
{src= >"bottom.htm",name= >"B"}]
]]
];
print $obj- >frame_set($f2,$pr);
# the following is the result:

< FRAMESET cols=150,* >
< FRAME src=left.htm name=L >
< FRAMESET rows=100,*,50 >
< FRAME src=top.htm name=T >
< FRAMESET cols=*,100 >
< FRAME src=main.htm name=C >
< FRAME src=right.htm name=R >
< / FRAMESET >
< FRAME src=bottom.htm name=B >
< / FRAMESET >
< / FRAMESET >

Return: HTML codes.

This method generates HTML codes based on the information provided. This method is also called < I >frameset< / I >.

<<less
Download (0.010MB)
Added: 2007-07-12 License: Perl Artistic License Price:
841 downloads
CGI::FastTemplate 1.09

CGI::FastTemplate 1.09


CGI::FastTemplate is a Perl extension for managing templates, and performing variable interpolation. more>>
CGI::FastTemplate is a Perl extension for managing templates, and performing variable interpolation.

SYNOPSIS

use CGI::FastTemplate;

$tpl = new CGI::FastTemplate();
$tpl = new CGI::FastTemplate("/path/to/templates");

CGI::FastTemplate->set_root("/path/to/templates"); ## all instances will use this path
$tpl->set_root("/path/to/templates"); ## this instance will use this path

$tpl->define( main => "main.tpl",
row => "table_row.tpl",
all => "table_all.tpl",
);

$tpl->assign(TITLE => "I am the title.");

my %defaults = ( FONT => "",
EMAIL => jmoore@sober.com,
);
$tpl->assign(%defaults);

$tpl->parse(ROWS => ".row"); ## the . appends to ROWS
$tpl->parse(CONTENT => ["row", "all"]);
$tpl->parse(CONTENT => "main");

$tpl->print(); ## defaults to last parsed
$tpl->print("CONTENT"); ## same as print() as "CONTENT" was last parsed

$ref = $tpl->fetch("CONTENT");

<<less
Download (0.013MB)
Added: 2006-08-01 License: Perl Artistic License Price:
1179 downloads
CGI::WeT::Modules::News 0.71

CGI::WeT::Modules::News 0.71


CGI::WeT::Modules::News are Perl extensions to engine to allow article management. more>>
CGI::WeT::Modules::News are Perl extensions to engine to allow article management.

SYNOPSIS

use CGI::WeT::Modules::News ();

This module provides rendering constructs to allow navigation through a set of articles. Support is provided for multiple types of articles in multiple groupings (or channels).

EXTENSIONS

CGI::WeT::Modules::News::initialize($engine, $r)

This subroutine will initialize the engine passed as $engine with information from Apache (passed as $r). The base URL for articles is set with the following.

PerlSetVar WeT_NewsURL /baseURL/

This is available for building URLs as @@NEWS@@. For example, general articles are under the URL returned by

$engine->url(@@NEWS@@/general/);

The directory may likewise be found by using

$engine->filename($engine->url(@@NEWS@@/general/));

NEWS_SUMMARY

This extension will insert a summary of available news items starting with the most recent (ordered by submission time). The top of the content stack is applied to each item as a template.

The template used is called with four elements on the content stack: Title, Date, Author, and Summary (Title on top of stack). The available arguments for controlling NEWS_SUMMARY are

channel

This argument specifies which channel to collect items from. This defaults to `general.

category

This argument specifies which category to collect items from. Only one category may be specified at this time. There is no way to block items marked as `all. The default category is `all.

link

If this is set to `title, the title will be made a link. No other value has an effect.

number

This tells NEWS_SUMMARY how many items to put in the list. There is no default for this argument, so one must be supplied.

NEWS_NEXT

This extension is like CGI::WeT::Modules::Basics LINK in that the top of the content stack is made into a link. The location is determined by the values of the arguments.

channel

See NEWS_SUMMARY

type

This can be either `story or `response. If `story, then the articles in the top level are looked at. Otherwise, the articles in the current directory are examined.

sequence

This can be either `next or `prev.

<<less
Download (0.040MB)
Added: 2006-10-06 License: GPL (GNU General Public License) Price:
1113 downloads
CGI::Minimal 1.25

CGI::Minimal 1.25


CGI::Minimal is a lightweight CGI form processing package. more>>
CGI::Minimal is a lightweight CGI form processing package.

SYNOPSIS

# use CGI::Minimal qw(:preload);
use CGI::Minimal;

my $cgi = CGI::Minimal->new;
if ($cgi->truncated) {
&scream_about_bad_form;
exit;
}
my $form_field_value = $cgi->param(some_field_name);

Provides a micro-weight alternative to the CGI.pm module
Rather than attempt to address every possible need of a CGI programmer, it provides the _minimum_ functions needed for CGI such as form decoding (including file upload forms), URL encoding and decoding, HTTP usable date generation (RFC1123 compliant dates) and basic escaping and unescaping of HTMLized text.

The :preload use time option is used to force all sub-component modules to load at compile time. It is not required for operation. It is solely a performance optimization for particular configurations. When used, it preloads the dehtmlize, param_mime, param_filename, date_rfc1123, url_decode, calling_parms_table and parameter setting supporting code. Those code sections are normally loaded automatically the first time they are needed.

The form decoding interface is somewhat compatible with the CGI.pm module. No provision is made for generating HTTP or HTML on your behalf - you are expected to be conversant with how to put together any HTML or HTTP you need.

<<less
Download (0.029MB)
Added: 2007-03-08 License: Perl Artistic License Price:
962 downloads
CGI::Simple 0.079

CGI::Simple 0.079


CGI::Simple is a simple totally OO CGI interface that is CGI.pm compliant. more>>
CGI::Simple is a simple totally OO CGI interface that is CGI.pm compliant.

SYNOPSIS

use CGI::Simple;
$CGI::Simple::POST_MAX = 1024; # max upload via post default 100kB
$CGI::Simple::DISABLE_UPLOADS = 0; # enable uploads

$q = new CGI::Simple;
$q = new CGI::Simple( { foo=>1, bar=>[2,3,4] } );
$q = new CGI::Simple( foo=1&bar=2&bar=3&bar=4 );
$q = new CGI::Simple( *FILEHANDLE );

$q->save( *FILEHANDLE ); # save current object to a file as used by new

@params = $q->param; # return all param names as a list
$value = $q->param(foo); # return the first value supplied for foo
@values = $q->param(foo); # return all values supplied for foo

%fields = $q->Vars; # returns untied key value pair hash
$hash_ref = $q->Vars; # or as a hash ref
%fields = $q->Vars("|"); # packs multiple values with "|" rather than " ";

@keywords = $q->keywords; # return all keywords as a list

$q->param( foo, some, new, values ); # set new foo values
$q->param( -name=>foo, -value=>bar );
$q->param( -name=>foo, -value=>[bar,baz] );

$q->param( foo, some, new, values ); # append values to foo
$q->append( -name=>foo, -value=>bar );
$q->append( -name=>foo, -value=>[some, new, values] );

$q->delete(foo); # delete param foo and all its values
$q->delete_all; # delete everything



$files = $q->upload() # number of files uploaded
@files = $q->upload(); # names of all uploaded files
$filename = $q->param(upload_file) # filename of uploaded file
$mime = $q->upload_info($filename,mime); # MIME type of uploaded file
$size = $q->upload_info($filename,size); # size of uploaded file

my $fh = $q->upload($filename); # get filehandle to read from
while ( read( $fh, $buffer, 1024 ) ) { ... }

# short and sweet upload
$ok = $q->upload( $q->param(upload_file), /path/to/write/file.name );
print "Uploaded ".$q->param(upload_file)." and wrote it OK!" if $ok;

$decoded = $q->url_decode($encoded);
$encoded = $q->url_encode($unencoded);
$escaped = $q->escapeHTML("&);
$unescaped = $q->unescapeHTML("&);

$qs = $q->query_string; # get all data in $q as a query string OK for GET

$q->no_cache(1); # set Pragma: no-cache + expires
print $q->header(); # print a simple header
# get a complex header
$header = $q->header( -type => image/gif
-nph => 1,
-status => 402 Payment required,
-expires =>+24h,
-cookie => $cookie,
-charset => utf-7,
-attachment => foo.gif,
-Cost => $2.00
);
# a p3p header (OK for redirect use as well)
$header = $q->header( -p3p => policyref="http://somesite.com/P3P/PolicyReferences.xml );

@cookies = $q->cookie(); # get names of all available cookies
$value = $q->cookie(foo) # get first value of cookie foo
@value = $q->cookie(foo) # get all values of cookie foo
# get a cookie formatted for header() method
$cookie = $q->cookie( -name => Password,
-values => [superuser,god,my dog woofie],
-expires => +3d,
-domain => .nowhere.com,
-path => /cgi-bin/database,
-secure => 1
);
print $q->header( -cookie=>$cookie ); # set cookie

print $q->redirect(http://go.away.now); # print a redirect header

dienice( $q->cgi_error ) if $q->cgi_error;

CGI::Simple provides a relatively lightweight drop in replacement for CGI.pm. It shares an identical OO interface to CGI.pm for parameter parsing, file upload, cookie handling and header generation. This module is entirely object oriented, however a complete functional interface is available by using the CGI::Simple::Standard module.

Essentially everything in CGI.pm that relates to the CGI (not HTML) side of things is available. There are even a few new methods and additions to old ones! If you are interested in what has gone on under the hood see the Compatibility with CGI.pm section at the end.

In practical testing this module loads and runs about twice as fast as CGI.pm depending on the precise task.

<<less
Download (0.083MB)
Added: 2007-03-08 License: Perl Artistic License Price:
960 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5