Tuesday, December 25, 2007

Modules Used in our Application

To Get more detail : perldoc perldoc
To Get more detail about module : perldoc

Frequently Used Modules :

HTML::Template:
We used this module in each and every methods (runmode) of our CGI files. Our html designs will be in template format and named as .tmpl Using this module we parse the template file and substitute the data fetched from the db and returns html output to the view(Browser).

Mostly used special variables : filename, die_on_bad_params, loop_context_vars.
Tags used : <TMPL_VAR NAME="PARAMETER_NAME">, <TMPL_LOOP NAME="LOOP_NAME"> ... </TMPL_LOOP>, <TMPL_INCLUDE NAME="filename.tmpl">, <TMPL_IF NAME="PARAMETER_NAME"> ... </TMPL_IF>

CGI::Application:
This module is framework for Web-application. We used this module through out our CGI files to get the data from the browser etc...

Class::MethodMaker:
For the accessors and mutators(get and set), we used this module.

DBI:
To access the database(fetch and store) through our application, we used DBI module.

Data::Dumper:
To view the data structure of a particular variable, we used this module.

Time::Piece:
This module is used to get and set the time, and to get the time in user format we used Time::Piece.

Time::HiRes:
To get the time interval, we used this module.

Carp:
Die of errors, we used this module.

POSIX qw(ceil floor):
To get the ceil value and floor value.

Number::Format qw(:subs):
Format the numbering Number::Format we used.

File::Spec::Functions:
To perform portable operations on files we used this module.

Log::Log4perl:
This module is mainly for logging purpose. We have method (debug, info, warn, error, fatal).

HTML::Pager:
For CGI HTML paging this module will be very useful. We customized more in this module and you can find now in our application located path at "Denali::CGI::HTMLPager".

Denali::Message:
This module will be available only in our spark application. Module for generating user-visible messages.

Test::More:
This is another framework for writing test scripts. The rules which we were writing under business module and methods under the model scripts we need to validate and test using this module Test::More.

Functions mostly used : use_ok, require_ok, ok, is, isa_ok

Modules which used but not frequent :

Storable qw(nfreeze thaw):
To store an object in a table, instead to get a portable image we used this method nfreeze. To retrieve an object back from image we used the method thaw.

Getopt::Long:
Extended processing of command line options. Using this we can pass argument in command line, and we can fetch and use the arguments in our program.

UNIVERSAL qw( isa can ):
Base class for ALL classes. To check the given model name exists in the object we used 'isa', and to check given method name exists in the object we used 'can'.

Pod::Usage:
print a usage message from embedded pod documentation

XML::Simple:
To parse an XML and to get data structure of the XML.

MIME::Lite:
To send an email through SMTP. We customized and it will be now "Denali::Mail".

Time::Piece::Month:
To get next month and some other month details.

Time::Seconds:
To get the time in seconds.

DataTime:
To compare given dates.

HTTP::Request & HTTP::Response:
For the HTTP style request and response, we used this.

LWP::UserAgent:
For the dispatching of web request and response we used LWP::UserAgent. Constructors we used are cookie_jar, timeout.

URI::Escape:
Escape and unescape unsafe characters in the request and response. Function which used uri_escape().

XML::LibXML:
To validate XML data.

No comments :

// Below script tag for SyntaxHighLighter