Cookie-Login version 0.01
=========================
The README is used to introduce the module and provide instructions on
how to install the module, any machine dependencies it may have (for
example C compilers and installed libraries) and any other information
that should be provided before the module is installed.
A README file is required for CPAN modules since CPAN extracts the
README file from a module distribution so that people browsing the
archive can use it get an idea of the modules uses. It is usually a
good idea to provide version information here so that people can
decide whether fixes for the module are worth downloading.
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
DEPENDENCIES
use CGI;
use vars qw();
use Data::Dumper;
use CGI::Cookie;
This module requires these other modules and libraries:
use Cookie::Session::Login;
my $value =Cookie::Session::Login->new;
# This function will create session cookie in browser
my $r=$value->session_start(
name=>'Demo_Test',
value=>'Hay',
exptime=>'1',
path =>''
);
#You can create more Browser cookies Like this
my $cookies=$value->create_cookie(
name=>'Demo_Next',
value=>'E-say',
exptime=>'1',
path =>''
);
# We can pass two parameters to this function [c-name or c-value] this function returns an array
#That array has both cookie name and cookie value, which depends up on changes of "c-name" and "c-value"
#The redirect_page function which is using for Redirecting to a page.
my @result=$value->cookie_extract("c-value");
if(!$result[1]){
$value->redirect_page("login.pl");
}else{
$value->redirect_page("index.pl");
}
# This http_header_hash funcions may contain Environment values of http headers
# This function will return a hash
my %Http_value=$value->http_header_hash;
foreach my $keys(keys %Http_value){
print $keys."=".$Http_value{$keys}."<br>";
}
#when you call delete_cookie function you can delete you created all cookies in the browser
$value->delete_cookie;
COPYRIGHT AND LICENCE
Copyright (C) 2012 by Mahesh Raghunath
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10.0 or,
at your option, any later version of Perl 5 you may have available.