MPMinus
view release on metacpan or search on metacpan
lib/MPMinus/Util.pm view on Meta::CPAN
my $md5_apache = get_md5_apache( "password" );
Returns MD5-hash digest of "password" value in apache notation
Please note! This function is not exported automatically!
=head2 get_md5_unix
my $md5_unix = get_md5_unix( "password" );
Returns MD5-hash digest of "password" value in unix notation
=head2 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
=head2 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 ('')
Please note! This function is not exported automatically!
=head2 msoconf2args
my %args = msoconf2args($m->conf('store'));
my $mso = new MPMinus::Store::MultiStore(
-m => $m,
-mso => \%args,
);
Converting MSO configuration section to MultiStore -mso arguments
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>
Please note! This function is not exported automatically!
=head1 HISTORY
=over 8
=item B<1.00 / 27.02.2008>
Init version on base mod_main 1.00.0002
=item B<1.10 / 01.04.2008>
Module is merged into the global module level
=item B<1.11 / 12.01.2009>
Fixed bugs in functions *datatime*
=item B<1.12 / 27.02.2009>
Module is merged into the global module level
=item B<1.20 / 28.04.2011>
Binary file's mode supported
=item B<1.21 / 14.05.2011>
modified functions tag and slash
=item B<1.22 / 19.10.2011>
Added function datetime2localtime and localtime2datetime as alias for localtime2date_time.
Added alias current_datetime for current_date_time
=item B<1.23 / Wed Apr 24 14:53:38 2013 MSK>
General refactoring
=item B<1.24 / Wed May 8 15:37:02 2013 MSK>
Added function msoconf2args
=back
( run in 1.148 second using v1.01-cache-2.11-cpan-5837b0d9d2c )