line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::Abacus; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
49250
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Math::Abacus - A toy model of Chinese abacus |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.01 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
The module is drafting. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use Math::Abacus; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Math::Abacus->num_of_digits(4); |
26
|
|
|
|
|
|
|
my $abacus = Math::Abacus->new(460); |
27
|
|
|
|
|
|
|
$abacus->add(1); |
28
|
|
|
|
|
|
|
$abacus->subtract(5); |
29
|
|
|
|
|
|
|
$abacus->show(); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# PRINT |
32
|
|
|
|
|
|
|
+-+-+-+-+-+ |
33
|
|
|
|
|
|
|
| x x x x | |
34
|
|
|
|
|
|
|
| x x | | | |
35
|
|
|
|
|
|
|
| | | x x | |
36
|
|
|
|
|
|
|
+-+-+-+-+-+ |
37
|
|
|
|
|
|
|
| | x | x | |
38
|
|
|
|
|
|
|
| x x x | | |
39
|
|
|
|
|
|
|
| x x x x | |
40
|
|
|
|
|
|
|
| x x x x | |
41
|
|
|
|
|
|
|
| x | x x | |
42
|
|
|
|
|
|
|
| x x x x | |
43
|
|
|
|
|
|
|
+-+-+-+-+-+ |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 METHODS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 show |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 add |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 subtract |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 AUTHOR |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Cheok-Yin Fung, C<< >> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SUPPORT |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
perldoc Math::Abacus |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
You can also look for information at: |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=over 4 |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item * CPAN Ratings |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
L |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=item * Search CPAN |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
L |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=back |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Cheok-Yin Fung. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This is free software, licensed under: |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
1; # End of Math::Abacus |