NAME
MPMinus::MainTools - The main function without the support of the configuration
VERSION
Version 1.24
SYNOPSIS
use MPMinus::MainTools;
DESCRIPTION
The module works with the main functions without the support of the configuration
- correct_loginpass
-
my $login = correct_loginpass( "anonymous" ); # 'anonymous' my $password = correct_loginpass( "{MOON}" ); # ''
Correcting a login or password. Issued lc () format username / password thatmust not contain characters other than those listed:
a-zA-Z0-9.,-_!@#$%^&*+=/\~|:;
Otherwise, it returns an empty value''
- getHiTime
-
See function "gettimeofday" in Time::HiRes
- getSID
-
my $sid = getSID( $length, $chars ); my $sid = getSID( 16, "m" ); # 16 successful chars consisting of MD5 hash my $sid = getSID( 20 ); # 20 successful chars consisting of a set of chars 0-9A-Z my $sid = getSID(); # 16 successful chars consisting of a set of chars 0-9A-Z
Function returns Session-ID (SID)
$chars - A string containing a collection of characters or code:
d - characters 0-9 w - characters A-Z h - HEX characters 0-9A-F m - Digest::MD5 function from Apache::Session::Generate::MD5 - default characters 0-9A-Z
- geturl
-
my $data = geturl( "http://www.example.com" ); my $data = geturl( "http://www.example.com", "login", "password" );
Getting a remote location or a simple authentication method in the argument. If the page is not then return empty ('').
- msoconf2args
-
Converting MSO configuration section to MultiStore -mso arguments
my %args = msoconf2args($m->conf('store')); my $mso = new MPMinus::Store::MultiStore( -m => $m, -mso => \%args, );
In conf/mso.conf:
<store foo> dsn DBI:mysql:database=NAME;host=HOST user login pass password <Attr> mysql_enable_utf8 1 RaiseError 0 PrintError 0 </Attr> </store> <store bar> dsn DBI:Oracle:SID user login pass password <Attr> RaiseError 0 PrintError 0 </Attr> </store>
- current_datetime, localtime2datetime and tagRestore
-
Deprecated functions
HISTORY
- 1.00 / 28.02.2008
-
Init version on base mod_main 1.00.0002
- 1.01 / 12.01.2009
-
Fixed bugs in functions *datatime*
- 1.10 / 27.02.2009
-
Module is merged into the global module level
- 1.20 / 28.04.2011
-
Binary file's mode supported
- 1.21 / 14.05.2011
-
modified functions tag and slash
- 1.22 / 19.10.2011
-
Added function datetime2localtime and localtime2datetime as alias for localtime2date_time.
Added alias current_datetime for current_date_time
- 1.23 / Wed Apr 24 14:53:38 2013 MSK
-
General refactoring
- 1.24 / Wed May 8 15:37:02 2013 MSK
-
Added function msoconf2args
AUTHOR
Serz Minus (Lepenkov Sergey) http://serzik.ru <minus@mail333.com>
COPYRIGHT
Copyright (C) 1998-2013 D&D Corporation. All Rights Reserved
LICENSE
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See LICENSE
file