line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Google::UULE::Generator; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
70464
|
use strict; |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
29
|
use 5.008_005; |
|
1
|
|
|
|
|
4
|
|
5
|
1
|
|
|
1
|
|
5
|
use base 'Exporter'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
90
|
|
6
|
1
|
|
|
1
|
|
529
|
use MIME::Base64 qw/encode_base64/; |
|
1
|
|
|
|
|
734
|
|
|
1
|
|
|
|
|
248
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
9
|
|
|
|
|
|
|
our @EXPORT_OK = qw/generate_uule/; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @_CS = ('A' .. 'Z', 'a' .. 'z', 0 .. 9, '-', '_'); |
12
|
|
|
|
|
|
|
sub generate_uule { |
13
|
3
|
|
|
3
|
0
|
88
|
my ($name) = @_; |
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
|
|
13
|
my $sec = @_CS[length($name) % scalar(@_CS)]; |
16
|
3
|
|
|
|
|
15
|
my $hashed = encode_base64($name, ''); |
17
|
3
|
|
|
|
|
19
|
$hashed =~ s/[\=]+$//g; |
18
|
3
|
|
|
|
|
17
|
return 'w+CAIQICI' . $sec . $hashed; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
__END__ |