blib/lib/Acme/Kensiro.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 18 | 18 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 23 | 24 | 95.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Acme::Kensiro; | ||||||
2 | 2 | 2 | 69452 | use strict; | |||
2 | 6 | ||||||
2 | 78 | ||||||
3 | 2 | 2 | 10 | use warnings; | |||
2 | 4 | ||||||
2 | 62 | ||||||
4 | 2 | 2 | 12 | use Exporter 'import'; | |||
2 | 8 | ||||||
2 | 175 | ||||||
5 | our @EXPORT = 'kensiro'; | ||||||
6 | |||||||
7 | our $VERSION = '0.16'; | ||||||
8 | |||||||
9 | 2 | 2 | 161 | use 5.008001; | |||
2 | 6 | ||||||
2 | 387 | ||||||
10 | |||||||
11 | sub kensiro { | ||||||
12 | 8 | 8 | 0 | 2761 | my $src = shift; | ||
13 | |||||||
14 | 8 | 36 | my $dst = reverse(unpack("b32", pack("L", $src))); | ||||
15 | 8 | 43 | $dst =~ s/^0*(.+)/$1/; | ||||
16 | 8 | 30 | $dst =~ s/0/た/g; | ||||
17 | 8 | 26 | $dst =~ s/1/あ/g; | ||||
18 | |||||||
19 | 8 | 39 | return $dst; | ||||
20 | } | ||||||
21 | |||||||
22 | 1; | ||||||
23 | __END__ |