App::Navegante - a framework to build intrusive high order proxies
Version 0.02
$ navegante examples/program
This module is mostly a place holder for the documentation. All the magic is done whith the navegante program.
navegante
To build an application using Navegante you need to have a program file. This program file is splitted in two major sections:
The first section is used to specify application parameters using a well defined DSL, detailed in the next section.
The second section is used to define any kind of functions needed by our application in Perl syntax.
The statements that can currently be used are:
init(STRING)
The name of the function that is called in the beginning of every application call.
desc(STRING)
The function that prints the application's behavior.
formtitle(STRING)
Define the form's title of the application.
save
TODO
mail
filename(STRING)
The destination filename for the newly create application. If no filename is specified, prints to standard output.
filename
feedback(STRING)
The function that is called when the application's feedback link is followed.
proc(STRING)
The function that is used to actually process the page content.
proctags(STRING)
The functions that should be called to process specific HTML tags content. For example:
proctags(h1=toitalic,h2=>underline)>
proctags(h1=
would call the function toitalic when processing H1 tag's content, and underline when processing H2 tag's content.
toitalic
H1
underline
H2
protect(LIST)
Comma separated list of HTML tags that will not be processed by the proc function. By default this list is: 'html','head','script' and 'title'.
proc
livefeedback(STRING)
The function that is used to render the feedback section in the application's banner.
annotate(STRING)
The fucntion that is called when the form user data, in the application's banner is submitted.
iform(STRING)
Used to used the form that is going to be rendered in the application's banner. For example:
iform(name=text,"Set name!"=>submit)>
iform(name=
Would render a iframe with a two elements form: a text box named name and a submit button. See also iframe for a more elaborate method to define this form.
name
iframe
iframe(STRING)
If defining the form that is used in the banner is not enough, you can use iframe to define the name of a function that returns the entire iframe content. Note that iframe always takes precedence over iform in case you define both.
iform
quit(STRING)
The function that is called when the appliccation's banner quit button is followed.
The space between "##" and EOF is just copied do application. Tipycally, it should include the implementation of the function described as arguments.
An example program file should look something like:
filename(reverse) formtitle(Reverse Browsed Content) feedback(reverseFeedback) proc(reverseFuncion) desc(reverseDesc) ## sub reverseFunction { ...
For more examples refer see TODO.
J.Joao Almeira, <jj@di.uminho.pt>
<jj@di.uminho.pt>
Alberto Simões, <albie@alfarrabio.di.uminho.pt>
<albie@alfarrabio.di.uminho.pt>
Nuno Carvalho, <smash@cpan.org>
<smash@cpan.org>
Please report any bugs or feature requests to bug-app-navegante at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-Navegante. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-app-navegante at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc App::Navegante
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-Navegante
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/App-Navegante
CPAN Ratings
http://cpanratings.perl.org/d/App-Navegante
Search CPAN
http://search.cpan.org/dist/App-Navegante
Copyright 2007-2012 Project Natura.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install App::Navegante, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Navegante
CPAN shell
perl -MCPAN -e shell install App::Navegante
For more information on module installation, please visit the detailed CPAN module installation guide.