FWS-Lite
view release on metacpan or search on metacpan
lib/FWS/Lite.pm view on Meta::CPAN
package FWS::Lite;
use 5.006;
use strict;
=head1 NAME
FWS::Lite - Version independent access to Framework Sites installations and common methods
=head1 VERSION
Version 0.004
=cut
our $VERSION = '0.004';
=head1 SYNOPSIS
use FWS::Lite;
#
# Create FWS with MySQL connectivity
#
my $fws = FWS::Lite->new( DBName => "theDBName",
DBUser => "myUser",
DBPassword => "myPass");
#
# create FWS with SQLite connectivity
#
my $fws2 = FWS::Lite->new( DBType => "SQLite",
DBName => "/home/user/your.db");
=head1 DESCRIPTION
This module provides basic input and output to a FrameWork Sites installation or can be used independently using the methodologies of FrameWork Sites data structures and file handling in a small package.
=head1 CONSTRUCTOR
Most uses of FWS::Lite are accessing data from live FWS installations and do not require anything but the database credentials. All non-required settings can be set for completeness or for the ability to run native FWS Code via FWS::Lite for testin...
=head2 new
my $fws = $fws->new(
DBName => "DBNameOrSQLitePathAndFile", # MySQL required
DBUser => "myDBUser", # MySQL required
DBPassword => "myDBPassword", # MySQL required
DBHost => "somePlace.somewhere.com", # default: localhost
DBType => "MySQL") # default: MySQL
Depending on if you are connecting to a MySQL or SQLite a combination of the following are required.
=over 4
=item * DBName (MySQL and SQLite Required)
For MySQL this is the DB Name. For SQLite this is the DB file path and file name.
MySQL example: user_fws
SQLite example: /home/user/secureFiles/user_fws.db
=item * DBUser (MySQL Required)
Required for MySQL and is the database user that has full grant access to the database.
=item * DBPassword (MySQL Required)
The DBUser's password.
=item * DBHost (MySQL Required if your database is not on localhost)
The DBHost will default to 'localhost' if not specified, but can be what ever is configured for the database environment.
=item * DBType (SQLite Required)
The DBType will default to 'MySQL' if not specified, but needs to be added if you are connecting to SQLite.
=back
Non-required parameters for FWS installations can be added, but depending on the scope of your task they usually are not needed unless your testing code, or interacting with web elements that display rendered content from a stand alone script.
=over 4
=item * domain
Full domain name with http prefix. Example: http://www.example.com
=item * filePath
Full path name of common files. Example: /home/user/www/files
=item * fileSecurePath
Full path name of non web accessible files. Example: /home/user/secureFiles
=item * fileWebPath
Web path for the same place filePath points to. Example: /files
=item * secureDomain
( run in 0.728 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )