| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Acme::Monme; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
45526
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
25
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
202
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Acme::Monme - Convert monme/gram to gram/monme. |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.01 |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
use Acme::Monme; |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use Acme::Monme; |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $num="1"; |
|
26
|
|
|
|
|
|
|
my $tmp1 = $num->Acme::Monme::monme_g; #monme to gram |
|
27
|
|
|
|
|
|
|
my $tmp2 = $num->Acme::Monme::g_monme; #gram to monme |
|
28
|
|
|
|
|
|
|
my $tmp3 = $num->Acme::Monme::kan_g; #kan to gram |
|
29
|
|
|
|
|
|
|
my $tmp4 = $num->Acme::Monme::g_kan; #gram to kan |
|
30
|
|
|
|
|
|
|
my $tmp5 = $num->Acme::Monme::sun_cm; #sun to cm |
|
31
|
|
|
|
|
|
|
my $tmp6 = $num->Acme::Monme::cm_sun; #cm to sun |
|
32
|
|
|
|
|
|
|
my $tmp7 = $num->Acme::Monme::shaku_cm; #shaku to cm |
|
33
|
|
|
|
|
|
|
my $tmp8 = $num->Acme::Monme::cm_shaku; #cm to shaku |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
print $tmp1 , "\n"; #3.75 |
|
36
|
|
|
|
|
|
|
print $tmp2 , "\n"; #0.266666666666667 |
|
37
|
|
|
|
|
|
|
print $tmp3 , "\n"; #3750 |
|
38
|
|
|
|
|
|
|
print $tmp4 , "\n"; #0.000266666666666667 |
|
39
|
|
|
|
|
|
|
print $tmp5 , "\n"; #3.03 |
|
40
|
|
|
|
|
|
|
print $tmp6 , "\n"; #0.33003300330033 |
|
41
|
|
|
|
|
|
|
print $tmp7 , "\n"; #30.3 |
|
42
|
|
|
|
|
|
|
print $tmp8 , "\n"; #0.033003300330033 |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Long, long ago , monme is widely used as a unit of weight in Asia. |
|
47
|
|
|
|
|
|
|
https://en.wikipedia.org/wiki/Japanese_units_of_measurement |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
This module can convert monme to gram. |
|
50
|
|
|
|
|
|
|
By the way, monme is sometime used in trading of pearls even now. So this module may useful for the perl mongers who love pearl. |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
In addition, this module can convert kan to gram. Similarly, it can convert sun and shaku to centimeters. |
|
53
|
|
|
|
|
|
|
Those functions are useful when Japanes who born in 300 years ago travel to the 21st century. |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 function1 |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub monme_g { |
|
62
|
0
|
|
|
0
|
0
|
|
my $monme = shift; |
|
63
|
0
|
|
|
|
|
|
my $gram = $monme * 3.75; |
|
64
|
0
|
|
|
|
|
|
return $gram; |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub g_monme { |
|
68
|
0
|
|
|
0
|
0
|
|
my $gram = shift; |
|
69
|
0
|
|
|
|
|
|
my $monme = $gram / 3.75; |
|
70
|
0
|
|
|
|
|
|
return $monme; |
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub kan_g { |
|
74
|
0
|
|
|
0
|
0
|
|
my $kan = shift; |
|
75
|
0
|
|
|
|
|
|
my $gram = $kan * 3750; |
|
76
|
0
|
|
|
|
|
|
return $gram; |
|
77
|
|
|
|
|
|
|
} |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub g_kan { |
|
80
|
0
|
|
|
0
|
0
|
|
my $gram = shift; |
|
81
|
0
|
|
|
|
|
|
my $kan = $gram / 3750; |
|
82
|
0
|
|
|
|
|
|
return $kan; |
|
83
|
|
|
|
|
|
|
} |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub sun_cm { |
|
86
|
0
|
|
|
0
|
0
|
|
my $sun = shift; |
|
87
|
0
|
|
|
|
|
|
my $cm = $sun * 3.03; |
|
88
|
0
|
|
|
|
|
|
return $cm; |
|
89
|
|
|
|
|
|
|
} |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub cm_sun { |
|
92
|
0
|
|
|
0
|
0
|
|
my $cm = shift; |
|
93
|
0
|
|
|
|
|
|
my $sun = $cm / 3.03; |
|
94
|
0
|
|
|
|
|
|
return $sun; |
|
95
|
|
|
|
|
|
|
} |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub shaku_cm { |
|
98
|
0
|
|
|
0
|
0
|
|
my $shaku = shift; |
|
99
|
0
|
|
|
|
|
|
my $cm = $shaku * 30.3; |
|
100
|
0
|
|
|
|
|
|
return $cm; |
|
101
|
|
|
|
|
|
|
} |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
sub cm_shaku { |
|
104
|
0
|
|
|
0
|
0
|
|
my $cm = shift; |
|
105
|
0
|
|
|
|
|
|
my $shaku = $cm / 30.3; |
|
106
|
0
|
|
|
|
|
|
return $shaku; |
|
107
|
|
|
|
|
|
|
} |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 function2 |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
0
|
1
|
|
sub function2 { |
|
115
|
|
|
|
|
|
|
} |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 AUTHOR |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Usuki Shunsuke, C<< >> |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head1 BUGS |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
|
124
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
|
125
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head1 SUPPORT |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
perldoc Acme::Monme |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
You can also look for information at: |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=over 4 |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
L |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
L |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=item * CPAN Ratings |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
L |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=item * Search CPAN |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
L |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=back |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Copyright 2017 Usuki Shunsuke. |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
168
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
|
169
|
|
|
|
|
|
|
copy of the full license at: |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
L |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
Any use, modification, and distribution of the Standard or Modified |
|
174
|
|
|
|
|
|
|
Versions is governed by this Artistic License. By using, modifying or |
|
175
|
|
|
|
|
|
|
distributing the Package, you accept this license. Do not use, modify, |
|
176
|
|
|
|
|
|
|
or distribute the Package, if you do not accept this license. |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
If your Modified Version has been derived from a Modified Version made |
|
179
|
|
|
|
|
|
|
by someone other than you, you are nevertheless required to ensure that |
|
180
|
|
|
|
|
|
|
your Modified Version complies with the requirements of this license. |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
This license does not grant you the right to use any trademark, service |
|
183
|
|
|
|
|
|
|
mark, tradename, or logo of the Copyright Holder. |
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
This license includes the non-exclusive, worldwide, free-of-charge |
|
186
|
|
|
|
|
|
|
patent license to make, have made, use, offer to sell, sell, import and |
|
187
|
|
|
|
|
|
|
otherwise transfer the Package with respect to any patent claims |
|
188
|
|
|
|
|
|
|
licensable by the Copyright Holder that are necessarily infringed by the |
|
189
|
|
|
|
|
|
|
Package. If you institute patent litigation (including a cross-claim or |
|
190
|
|
|
|
|
|
|
counterclaim) against any party alleging that the Package constitutes |
|
191
|
|
|
|
|
|
|
direct or contributory patent infringement, then this Artistic License |
|
192
|
|
|
|
|
|
|
to you shall terminate on the date that such litigation is filed. |
|
193
|
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER |
|
195
|
|
|
|
|
|
|
AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. |
|
196
|
|
|
|
|
|
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
|
197
|
|
|
|
|
|
|
PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY |
|
198
|
|
|
|
|
|
|
YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR |
|
199
|
|
|
|
|
|
|
CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR |
|
200
|
|
|
|
|
|
|
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, |
|
201
|
|
|
|
|
|
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
202
|
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=cut |
|
205
|
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
1; # End of Acme::Monme |