line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Venus::Boolean; |
2
|
|
|
|
|
|
|
|
3
|
14
|
|
|
14
|
|
413
|
use 5.018; |
|
14
|
|
|
|
|
58
|
|
4
|
|
|
|
|
|
|
|
5
|
14
|
|
|
14
|
|
86
|
use strict; |
|
14
|
|
|
|
|
40
|
|
|
14
|
|
|
|
|
360
|
|
6
|
14
|
|
|
14
|
|
76
|
use warnings; |
|
14
|
|
|
|
|
38
|
|
|
14
|
|
|
|
|
417
|
|
7
|
|
|
|
|
|
|
|
8
|
14
|
|
|
14
|
|
82
|
use Venus::Class 'base'; |
|
14
|
|
|
|
|
37
|
|
|
14
|
|
|
|
|
118
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
base 'Venus::Kind::Value'; |
11
|
|
|
|
|
|
|
|
12
|
14
|
|
|
14
|
|
106
|
use Venus::True; |
|
14
|
|
|
|
|
37
|
|
|
14
|
|
|
|
|
382
|
|
13
|
14
|
|
|
14
|
|
87
|
use Venus::False; |
|
14
|
|
|
|
|
35
|
|
|
14
|
|
|
|
|
5539
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
state $true = Venus::True->value; |
16
|
|
|
|
|
|
|
state $true_ref = \$true; |
17
|
|
|
|
|
|
|
state $true_type = 'true'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
state $false = Venus::False->value; |
20
|
|
|
|
|
|
|
state $false_ref = \$false; |
21
|
|
|
|
|
|
|
state $false_type = 'false'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use overload ( |
24
|
39
|
100
|
|
39
|
|
180
|
'!' => sub{$_[0]->get ? $false : $true}, |
25
|
1
|
50
|
|
1
|
|
7
|
'<' => sub{!!$_[0] < !!$_[1] ? $true : $false}, |
26
|
1
|
50
|
|
1
|
|
5
|
'<=' => sub{!!$_[0] <= !!$_[1] ? $true : $false}, |
27
|
1
|
50
|
|
1
|
|
5
|
'>' => sub{!!$_[0] > !!$_[1] ? $true : $false}, |
28
|
1
|
50
|
|
1
|
|
6
|
'>=' => sub{!!$_[0] >= !!$_[1] ? $true : $false}, |
29
|
1
|
50
|
|
1
|
|
6
|
'!=' => sub{!!$_[0] != !!$_[1] ? $true : $false}, |
30
|
1
|
50
|
|
1
|
|
5
|
'==' => sub{!!$_[0] == !!$_[1] ? $true : $false}, |
31
|
21
|
50
|
|
21
|
|
876
|
'bool' => sub{!!$_[0] ? $true : $false}, |
32
|
1
|
50
|
|
1
|
|
10
|
'eq' => sub{"$_[0]" eq "$_[1]" ? $true : $false}, |
33
|
1
|
50
|
|
1
|
|
4
|
'ne' => sub{"$_[0]" ne "$_[1]" ? $true : $false}, |
34
|
1
|
50
|
|
1
|
|
5
|
'qr' => sub{"$_[0]" ? qr/$true/ : qr/$false/}, |
35
|
14
|
|
|
|
|
416
|
fallback => 1, |
36
|
14
|
|
|
14
|
|
116
|
); |
|
14
|
|
|
|
|
73
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# BUILDERS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub build_arg { |
41
|
13
|
|
|
13
|
0
|
47
|
my ($self, $data) = @_; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
return { |
44
|
13
|
|
|
|
|
59
|
value => $data, |
45
|
|
|
|
|
|
|
}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub build_args { |
49
|
139
|
|
|
139
|
0
|
341
|
my ($self, $data) = @_; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
$data->{value} = (defined $data->{value} && !!$data->{value}) |
52
|
139
|
100
|
100
|
|
|
596
|
? $true |
53
|
|
|
|
|
|
|
: $false; |
54
|
|
|
|
|
|
|
|
55
|
139
|
|
|
|
|
391
|
return $data; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub build_nil { |
59
|
0
|
|
|
0
|
0
|
0
|
my ($self, $data) = @_; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
return { |
62
|
0
|
|
|
|
|
0
|
value => {}, |
63
|
|
|
|
|
|
|
}; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub build_self { |
67
|
139
|
|
|
139
|
0
|
280
|
my ($self, $data) = @_; |
68
|
|
|
|
|
|
|
|
69
|
139
|
|
|
|
|
421
|
$data->{value} = BOOL(TO_BOOL($data->{value})); |
70
|
|
|
|
|
|
|
|
71
|
139
|
|
|
|
|
339
|
return $self; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
# METHODS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub assertion { |
77
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
78
|
|
|
|
|
|
|
|
79
|
0
|
|
|
|
|
0
|
my $assert = $self->SUPER::assertion; |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
0
|
$assert->clear->expression('boolean'); |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
0
|
return $assert; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
sub comparer { |
87
|
114
|
|
|
114
|
0
|
232
|
my ($self) = @_; |
88
|
|
|
|
|
|
|
|
89
|
114
|
|
|
|
|
323
|
return 'numified'; |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub default { |
93
|
1
|
|
|
1
|
1
|
5
|
return $false; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub is_false { |
97
|
1
|
|
|
1
|
1
|
3
|
my ($self) = @_; |
98
|
|
|
|
|
|
|
|
99
|
1
|
50
|
|
|
|
5
|
return $self->get ? $false : $true; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub is_true { |
103
|
1
|
|
|
1
|
1
|
4
|
my ($self) = @_; |
104
|
|
|
|
|
|
|
|
105
|
1
|
50
|
|
|
|
6
|
return $self->get ? $true : $false; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
sub negate { |
109
|
1
|
|
|
1
|
1
|
4
|
my ($self) = @_; |
110
|
|
|
|
|
|
|
|
111
|
1
|
50
|
|
|
|
4
|
return $self->get ? $false : $true; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub numified { |
115
|
129
|
|
|
129
|
1
|
242
|
my ($self) = @_; |
116
|
|
|
|
|
|
|
|
117
|
129
|
|
|
|
|
296
|
return 0 + $self->value; |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
sub string { |
121
|
1
|
|
|
1
|
1
|
4
|
my ($self) = @_; |
122
|
|
|
|
|
|
|
|
123
|
1
|
50
|
|
|
|
5
|
return $self->get ? $true_type : $false_type; |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
sub BOOL { |
127
|
139
|
100
|
|
139
|
0
|
440
|
return $_[0] ? $true : $false; |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
sub BOOL_REF { |
131
|
0
|
0
|
|
0
|
0
|
0
|
return $_[0] ? $true_ref : $false_ref; |
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
sub FALSE { |
135
|
2
|
|
|
2
|
0
|
21
|
return $false; |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
sub FROM_BOOL { |
139
|
3
|
|
|
3
|
0
|
6
|
my ($value) = @_; |
140
|
|
|
|
|
|
|
|
141
|
3
|
|
|
|
|
25
|
my $object = Scalar::Util::blessed($value); |
142
|
3
|
100
|
100
|
|
|
27
|
my $scalar = ((Scalar::Util::reftype($value) // '') eq 'SCALAR') ? 1 : 0; |
143
|
|
|
|
|
|
|
|
144
|
3
|
100
|
66
|
|
|
43
|
if ($object && $scalar && defined($$value) && !ref($$value) && $$value == 1) { |
|
|
50
|
66
|
|
|
|
|
|
|
50
|
33
|
|
|
|
|
|
|
50
|
33
|
|
|
|
|
|
|
50
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
145
|
1
|
|
|
|
|
6
|
return $true; |
146
|
|
|
|
|
|
|
} |
147
|
|
|
|
|
|
|
elsif ($object && $scalar && defined($$value) && !ref($$value) && $$value == 0) { |
148
|
0
|
|
|
|
|
0
|
return $false; |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
elsif ($object && $value->isa('Venus::True')) { |
151
|
0
|
|
|
|
|
0
|
return $value->value; |
152
|
|
|
|
|
|
|
} |
153
|
|
|
|
|
|
|
elsif ($object && $value->isa('Venus::False')) { |
154
|
0
|
|
|
|
|
0
|
return $value->value; |
155
|
|
|
|
|
|
|
} |
156
|
|
|
|
|
|
|
elsif ($object && $value->isa('Venus::Boolean')) { |
157
|
0
|
|
|
|
|
0
|
return $value->get; |
158
|
|
|
|
|
|
|
} |
159
|
|
|
|
|
|
|
else { |
160
|
2
|
|
|
|
|
17
|
return $value; |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
} |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
sub TO_BOOL { |
165
|
142
|
|
|
142
|
0
|
296
|
my ($value) = @_; |
166
|
|
|
|
|
|
|
|
167
|
142
|
|
|
|
|
537
|
my $isdual = Scalar::Util::isdual($value); |
168
|
|
|
|
|
|
|
|
169
|
142
|
100
|
66
|
|
|
1489
|
if ($isdual && ("$value" && "$value" == "1" && ($value + 0) == 1)) { |
|
|
100
|
66
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
66
|
|
|
|
|
170
|
9
|
|
|
|
|
48
|
return $true; |
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
elsif ($isdual && (("$value" eq "") || ("$value" == "0" && ($value + 0) == 0))) { |
173
|
131
|
|
|
|
|
482
|
return $false; |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
else { |
176
|
2
|
|
|
|
|
10
|
return $value; |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
sub TO_BOOL_REF { |
181
|
0
|
|
|
0
|
0
|
0
|
my ($value) = @_; |
182
|
|
|
|
|
|
|
|
183
|
0
|
|
|
|
|
0
|
my $isdual = Scalar::Util::isdual($value); |
184
|
|
|
|
|
|
|
|
185
|
0
|
0
|
0
|
|
|
0
|
if ($isdual && ("$value" && "$value" == "1" && ($value + 0) == 1)) { |
|
|
0
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
186
|
0
|
|
|
|
|
0
|
return $true_ref; |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
elsif ($isdual && (("$value" eq "") || ("$value" == "0" && ($value + 0) == 0))) { |
189
|
0
|
|
|
|
|
0
|
return $false_ref; |
190
|
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
else { |
192
|
0
|
|
|
|
|
0
|
return $value; |
193
|
|
|
|
|
|
|
} |
194
|
|
|
|
|
|
|
} |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
sub TO_BOOL_JPO { |
197
|
20
|
|
|
20
|
0
|
33
|
my ($value) = @_; |
198
|
|
|
|
|
|
|
|
199
|
20
|
|
|
|
|
59
|
require JSON::PP; |
200
|
|
|
|
|
|
|
|
201
|
20
|
|
|
|
|
53
|
my $isdual = Scalar::Util::isdual($value); |
202
|
|
|
|
|
|
|
|
203
|
20
|
100
|
33
|
|
|
85
|
if ($isdual && ("$value" && "$value" == "1" && ($value + 0) == 1)) { |
|
|
50
|
33
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
33
|
|
|
|
|
204
|
4
|
|
|
|
|
14
|
return JSON::PP::true(); |
205
|
|
|
|
|
|
|
} |
206
|
|
|
|
|
|
|
elsif ($isdual && (("$value" eq "") || ("$value" == "0" && ($value + 0) == 0))) { |
207
|
0
|
|
|
|
|
0
|
return JSON::PP::false(); |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
else { |
210
|
16
|
|
|
|
|
55
|
return $value; |
211
|
|
|
|
|
|
|
} |
212
|
|
|
|
|
|
|
} |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
sub TO_BOOL_TFO { |
215
|
0
|
|
|
0
|
0
|
0
|
my ($value) = @_; |
216
|
|
|
|
|
|
|
|
217
|
0
|
|
|
|
|
0
|
my $isdual = Scalar::Util::isdual($value); |
218
|
|
|
|
|
|
|
|
219
|
0
|
0
|
0
|
|
|
0
|
if ($isdual && ("$value" && "$value" == "1" && ($value + 0) == 1)) { |
|
|
0
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
220
|
0
|
|
|
|
|
0
|
return Venus::True->new; |
221
|
|
|
|
|
|
|
} |
222
|
|
|
|
|
|
|
elsif ($isdual && (("$value" eq "") || ("$value" == "0" && ($value + 0) == 0))) { |
223
|
0
|
|
|
|
|
0
|
return Venus::False->new; |
224
|
|
|
|
|
|
|
} |
225
|
|
|
|
|
|
|
else { |
226
|
0
|
|
|
|
|
0
|
return $value; |
227
|
|
|
|
|
|
|
} |
228
|
|
|
|
|
|
|
} |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
sub TO_JSON { |
231
|
0
|
|
|
0
|
0
|
0
|
my ($self) = @_; |
232
|
|
|
|
|
|
|
|
233
|
14
|
|
|
14
|
|
19713
|
no strict 'refs'; |
|
14
|
|
|
|
|
62
|
|
|
14
|
|
|
|
|
5102
|
|
234
|
|
|
|
|
|
|
|
235
|
0
|
0
|
|
|
|
0
|
return $self->get ? $true_ref : $false_ref; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
sub TRUE { |
239
|
4
|
|
|
4
|
0
|
19
|
return $true; |
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
1; |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
=head1 NAME |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
Venus::Boolean - Boolean Class |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=cut |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=head1 ABSTRACT |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
Boolean Class for Perl 5 |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
=cut |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
=head1 SYNOPSIS |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
package main; |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
use Venus::Boolean; |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
# $boolean->negate; |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
=cut |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
=head1 DESCRIPTION |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
This package provides a representation for boolean values. |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
=cut |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
=head1 INHERITS |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
This package inherits behaviors from: |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
L |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
=cut |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
=head1 METHODS |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
This package provides the following methods: |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
=cut |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
=head2 cast |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
cast(string $kind) (object | undef) |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
The cast method converts L<"value"|Venus::Kind::Value> objects between |
295
|
|
|
|
|
|
|
different I<"value"> object types, based on the name of the type provided. This |
296
|
|
|
|
|
|
|
method will return C if the invocant is not a L. |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
I> |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
=over 4 |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
=item cast example 1 |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
package main; |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
use Venus::Boolean; |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
my $cast = $boolean->cast('array'); |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
# bless({ value => [0] }, "Venus::Array") |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
=back |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
=over 4 |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
=item cast example 2 |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
package main; |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
use Venus::Boolean; |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
my $cast = $boolean->cast('boolean'); |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
# bless({ value => 0 }, "Venus::Boolean") |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
=back |
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
=over 4 |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
=item cast example 3 |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
package main; |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
use Venus::Boolean; |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
my $cast = $boolean->cast('code'); |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
# bless({ value => sub { ... } }, "Venus::Code") |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
=back |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
=over 4 |
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
=item cast example 4 |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
package main; |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
use Venus::Boolean; |
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
my $cast = $boolean->cast('float'); |
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
# bless({ value => "0.0" }, "Venus::Float") |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
=back |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
=over 4 |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
=item cast example 5 |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
package main; |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
use Venus::Boolean; |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
my $cast = $boolean->cast('hash'); |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
# bless({ value => { "0" => 0 } }, "Venus::Hash") |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
=back |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
=over 4 |
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
=item cast example 6 |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
package main; |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
use Venus::Boolean; |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
my $cast = $boolean->cast('number'); |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
# bless({ value => 0 }, "Venus::Number") |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=back |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
=over 4 |
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
=item cast example 7 |
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
package main; |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
use Venus::Boolean; |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
my $cast = $boolean->cast('regexp'); |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
# bless({ value => qr/(?^u:0)/ }, "Venus::Regexp") |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
=back |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
=over 4 |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
=item cast example 8 |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
package main; |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
use Venus::Boolean; |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
my $cast = $boolean->cast('scalar'); |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
# bless({ value => \0 }, "Venus::Scalar") |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=back |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
=over 4 |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
=item cast example 9 |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
package main; |
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
use Venus::Boolean; |
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
my $cast = $boolean->cast('string'); |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
# bless({ value => 0 }, "Venus::String") |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
=back |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
=over 4 |
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
=item cast example 10 |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
package main; |
449
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
use Venus::Boolean; |
451
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new; |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
my $cast = $boolean->cast('undef'); |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
# bless({ value => undef }, "Venus::Undef") |
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
=back |
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
=cut |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
=head2 default |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
default() (boolean) |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
The default method returns the default value, i.e. C<0>. |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
I> |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
=over 4 |
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
=item default example 1 |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
# given: synopsis; |
475
|
|
|
|
|
|
|
|
476
|
|
|
|
|
|
|
my $default = $boolean->default; |
477
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
# 0 |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
=back |
481
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
=cut |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
=head2 eq |
485
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
eq(any $arg) (boolean) |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
The eq method performs an I<"equals"> operation using the argument provided. |
489
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
I> |
491
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
=over 4 |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
=item eq example 1 |
495
|
|
|
|
|
|
|
|
496
|
|
|
|
|
|
|
package main; |
497
|
|
|
|
|
|
|
|
498
|
|
|
|
|
|
|
use Venus::Array; |
499
|
|
|
|
|
|
|
use Venus::Boolean; |
500
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
502
|
|
|
|
|
|
|
my $rvalue = Venus::Array->new; |
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
my $result = $lvalue->eq($rvalue); |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
# 0 |
507
|
|
|
|
|
|
|
|
508
|
|
|
|
|
|
|
=back |
509
|
|
|
|
|
|
|
|
510
|
|
|
|
|
|
|
=over 4 |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
=item eq example 2 |
513
|
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
package main; |
515
|
|
|
|
|
|
|
|
516
|
|
|
|
|
|
|
use Venus::Boolean; |
517
|
|
|
|
|
|
|
|
518
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
519
|
|
|
|
|
|
|
my $rvalue = Venus::Boolean->new; |
520
|
|
|
|
|
|
|
|
521
|
|
|
|
|
|
|
my $result = $lvalue->eq($rvalue); |
522
|
|
|
|
|
|
|
|
523
|
|
|
|
|
|
|
# 1 |
524
|
|
|
|
|
|
|
|
525
|
|
|
|
|
|
|
=back |
526
|
|
|
|
|
|
|
|
527
|
|
|
|
|
|
|
=over 4 |
528
|
|
|
|
|
|
|
|
529
|
|
|
|
|
|
|
=item eq example 3 |
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
package main; |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
use Venus::Code; |
534
|
|
|
|
|
|
|
use Venus::Boolean; |
535
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
537
|
|
|
|
|
|
|
my $rvalue = Venus::Code->new; |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
my $result = $lvalue->eq($rvalue); |
540
|
|
|
|
|
|
|
|
541
|
|
|
|
|
|
|
# 0 |
542
|
|
|
|
|
|
|
|
543
|
|
|
|
|
|
|
=back |
544
|
|
|
|
|
|
|
|
545
|
|
|
|
|
|
|
=over 4 |
546
|
|
|
|
|
|
|
|
547
|
|
|
|
|
|
|
=item eq example 4 |
548
|
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
package main; |
550
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
use Venus::Float; |
552
|
|
|
|
|
|
|
use Venus::Boolean; |
553
|
|
|
|
|
|
|
|
554
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
555
|
|
|
|
|
|
|
my $rvalue = Venus::Float->new; |
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
my $result = $lvalue->eq($rvalue); |
558
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
# 1 |
560
|
|
|
|
|
|
|
|
561
|
|
|
|
|
|
|
=back |
562
|
|
|
|
|
|
|
|
563
|
|
|
|
|
|
|
=over 4 |
564
|
|
|
|
|
|
|
|
565
|
|
|
|
|
|
|
=item eq example 5 |
566
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
package main; |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
use Venus::Hash; |
570
|
|
|
|
|
|
|
use Venus::Boolean; |
571
|
|
|
|
|
|
|
|
572
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
573
|
|
|
|
|
|
|
my $rvalue = Venus::Hash->new; |
574
|
|
|
|
|
|
|
|
575
|
|
|
|
|
|
|
my $result = $lvalue->eq($rvalue); |
576
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
# 0 |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
=back |
580
|
|
|
|
|
|
|
|
581
|
|
|
|
|
|
|
=over 4 |
582
|
|
|
|
|
|
|
|
583
|
|
|
|
|
|
|
=item eq example 6 |
584
|
|
|
|
|
|
|
|
585
|
|
|
|
|
|
|
package main; |
586
|
|
|
|
|
|
|
|
587
|
|
|
|
|
|
|
use Venus::Boolean; |
588
|
|
|
|
|
|
|
use Venus::Number; |
589
|
|
|
|
|
|
|
|
590
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
591
|
|
|
|
|
|
|
my $rvalue = Venus::Number->new; |
592
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
my $result = $lvalue->eq($rvalue); |
594
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
# 1 |
596
|
|
|
|
|
|
|
|
597
|
|
|
|
|
|
|
=back |
598
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
=over 4 |
600
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
=item eq example 7 |
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
package main; |
604
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
use Venus::Boolean; |
606
|
|
|
|
|
|
|
use Venus::Regexp; |
607
|
|
|
|
|
|
|
|
608
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
609
|
|
|
|
|
|
|
my $rvalue = Venus::Regexp->new; |
610
|
|
|
|
|
|
|
|
611
|
|
|
|
|
|
|
my $result = $lvalue->eq($rvalue); |
612
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
# 0 |
614
|
|
|
|
|
|
|
|
615
|
|
|
|
|
|
|
=back |
616
|
|
|
|
|
|
|
|
617
|
|
|
|
|
|
|
=over 4 |
618
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
=item eq example 8 |
620
|
|
|
|
|
|
|
|
621
|
|
|
|
|
|
|
package main; |
622
|
|
|
|
|
|
|
|
623
|
|
|
|
|
|
|
use Venus::Boolean; |
624
|
|
|
|
|
|
|
use Venus::Scalar; |
625
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
627
|
|
|
|
|
|
|
my $rvalue = Venus::Scalar->new; |
628
|
|
|
|
|
|
|
|
629
|
|
|
|
|
|
|
my $result = $lvalue->eq($rvalue); |
630
|
|
|
|
|
|
|
|
631
|
|
|
|
|
|
|
# 0 |
632
|
|
|
|
|
|
|
|
633
|
|
|
|
|
|
|
=back |
634
|
|
|
|
|
|
|
|
635
|
|
|
|
|
|
|
=over 4 |
636
|
|
|
|
|
|
|
|
637
|
|
|
|
|
|
|
=item eq example 9 |
638
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
package main; |
640
|
|
|
|
|
|
|
|
641
|
|
|
|
|
|
|
use Venus::Boolean; |
642
|
|
|
|
|
|
|
use Venus::String; |
643
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
645
|
|
|
|
|
|
|
my $rvalue = Venus::String->new; |
646
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
my $result = $lvalue->eq($rvalue); |
648
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
# 1 |
650
|
|
|
|
|
|
|
|
651
|
|
|
|
|
|
|
=back |
652
|
|
|
|
|
|
|
|
653
|
|
|
|
|
|
|
=over 4 |
654
|
|
|
|
|
|
|
|
655
|
|
|
|
|
|
|
=item eq example 10 |
656
|
|
|
|
|
|
|
|
657
|
|
|
|
|
|
|
package main; |
658
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
use Venus::Boolean; |
660
|
|
|
|
|
|
|
use Venus::Undef; |
661
|
|
|
|
|
|
|
|
662
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
663
|
|
|
|
|
|
|
my $rvalue = Venus::Undef->new; |
664
|
|
|
|
|
|
|
|
665
|
|
|
|
|
|
|
my $result = $lvalue->eq($rvalue); |
666
|
|
|
|
|
|
|
|
667
|
|
|
|
|
|
|
# 1 |
668
|
|
|
|
|
|
|
|
669
|
|
|
|
|
|
|
=back |
670
|
|
|
|
|
|
|
|
671
|
|
|
|
|
|
|
=cut |
672
|
|
|
|
|
|
|
|
673
|
|
|
|
|
|
|
=head2 ge |
674
|
|
|
|
|
|
|
|
675
|
|
|
|
|
|
|
ge(any $arg) (boolean) |
676
|
|
|
|
|
|
|
|
677
|
|
|
|
|
|
|
The ge method performs a I<"greater-than-or-equal-to"> operation using the |
678
|
|
|
|
|
|
|
argument provided. |
679
|
|
|
|
|
|
|
|
680
|
|
|
|
|
|
|
I> |
681
|
|
|
|
|
|
|
|
682
|
|
|
|
|
|
|
=over 4 |
683
|
|
|
|
|
|
|
|
684
|
|
|
|
|
|
|
=item ge example 1 |
685
|
|
|
|
|
|
|
|
686
|
|
|
|
|
|
|
package main; |
687
|
|
|
|
|
|
|
|
688
|
|
|
|
|
|
|
use Venus::Array; |
689
|
|
|
|
|
|
|
use Venus::Boolean; |
690
|
|
|
|
|
|
|
|
691
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
692
|
|
|
|
|
|
|
my $rvalue = Venus::Array->new; |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
my $result = $lvalue->ge($rvalue); |
695
|
|
|
|
|
|
|
|
696
|
|
|
|
|
|
|
# 0 |
697
|
|
|
|
|
|
|
|
698
|
|
|
|
|
|
|
=back |
699
|
|
|
|
|
|
|
|
700
|
|
|
|
|
|
|
=over 4 |
701
|
|
|
|
|
|
|
|
702
|
|
|
|
|
|
|
=item ge example 2 |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
package main; |
705
|
|
|
|
|
|
|
|
706
|
|
|
|
|
|
|
use Venus::Boolean; |
707
|
|
|
|
|
|
|
|
708
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
709
|
|
|
|
|
|
|
my $rvalue = Venus::Boolean->new; |
710
|
|
|
|
|
|
|
|
711
|
|
|
|
|
|
|
my $result = $lvalue->ge($rvalue); |
712
|
|
|
|
|
|
|
|
713
|
|
|
|
|
|
|
# 1 |
714
|
|
|
|
|
|
|
|
715
|
|
|
|
|
|
|
=back |
716
|
|
|
|
|
|
|
|
717
|
|
|
|
|
|
|
=over 4 |
718
|
|
|
|
|
|
|
|
719
|
|
|
|
|
|
|
=item ge example 3 |
720
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
package main; |
722
|
|
|
|
|
|
|
|
723
|
|
|
|
|
|
|
use Venus::Code; |
724
|
|
|
|
|
|
|
use Venus::Boolean; |
725
|
|
|
|
|
|
|
|
726
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
727
|
|
|
|
|
|
|
my $rvalue = Venus::Code->new; |
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
my $result = $lvalue->ge($rvalue); |
730
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
# 0 |
732
|
|
|
|
|
|
|
|
733
|
|
|
|
|
|
|
=back |
734
|
|
|
|
|
|
|
|
735
|
|
|
|
|
|
|
=over 4 |
736
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
=item ge example 4 |
738
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
package main; |
740
|
|
|
|
|
|
|
|
741
|
|
|
|
|
|
|
use Venus::Hash; |
742
|
|
|
|
|
|
|
use Venus::Boolean; |
743
|
|
|
|
|
|
|
|
744
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
745
|
|
|
|
|
|
|
my $rvalue = Venus::Hash->new; |
746
|
|
|
|
|
|
|
|
747
|
|
|
|
|
|
|
my $result = $lvalue->ge($rvalue); |
748
|
|
|
|
|
|
|
|
749
|
|
|
|
|
|
|
# 0 |
750
|
|
|
|
|
|
|
|
751
|
|
|
|
|
|
|
=back |
752
|
|
|
|
|
|
|
|
753
|
|
|
|
|
|
|
=over 4 |
754
|
|
|
|
|
|
|
|
755
|
|
|
|
|
|
|
=item ge example 5 |
756
|
|
|
|
|
|
|
|
757
|
|
|
|
|
|
|
package main; |
758
|
|
|
|
|
|
|
|
759
|
|
|
|
|
|
|
use Venus::Boolean; |
760
|
|
|
|
|
|
|
use Venus::Number; |
761
|
|
|
|
|
|
|
|
762
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
763
|
|
|
|
|
|
|
my $rvalue = Venus::Number->new; |
764
|
|
|
|
|
|
|
|
765
|
|
|
|
|
|
|
my $result = $lvalue->ge($rvalue); |
766
|
|
|
|
|
|
|
|
767
|
|
|
|
|
|
|
# 1 |
768
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
=back |
770
|
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
=over 4 |
772
|
|
|
|
|
|
|
|
773
|
|
|
|
|
|
|
=item ge example 6 |
774
|
|
|
|
|
|
|
|
775
|
|
|
|
|
|
|
package main; |
776
|
|
|
|
|
|
|
|
777
|
|
|
|
|
|
|
use Venus::Boolean; |
778
|
|
|
|
|
|
|
use Venus::Regexp; |
779
|
|
|
|
|
|
|
|
780
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
781
|
|
|
|
|
|
|
my $rvalue = Venus::Regexp->new; |
782
|
|
|
|
|
|
|
|
783
|
|
|
|
|
|
|
my $result = $lvalue->ge($rvalue); |
784
|
|
|
|
|
|
|
|
785
|
|
|
|
|
|
|
# 0 |
786
|
|
|
|
|
|
|
|
787
|
|
|
|
|
|
|
=back |
788
|
|
|
|
|
|
|
|
789
|
|
|
|
|
|
|
=over 4 |
790
|
|
|
|
|
|
|
|
791
|
|
|
|
|
|
|
=item ge example 7 |
792
|
|
|
|
|
|
|
|
793
|
|
|
|
|
|
|
package main; |
794
|
|
|
|
|
|
|
|
795
|
|
|
|
|
|
|
use Venus::Boolean; |
796
|
|
|
|
|
|
|
use Venus::Scalar; |
797
|
|
|
|
|
|
|
|
798
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
799
|
|
|
|
|
|
|
my $rvalue = Venus::Scalar->new; |
800
|
|
|
|
|
|
|
|
801
|
|
|
|
|
|
|
my $result = $lvalue->ge($rvalue); |
802
|
|
|
|
|
|
|
|
803
|
|
|
|
|
|
|
# 0 |
804
|
|
|
|
|
|
|
|
805
|
|
|
|
|
|
|
=back |
806
|
|
|
|
|
|
|
|
807
|
|
|
|
|
|
|
=over 4 |
808
|
|
|
|
|
|
|
|
809
|
|
|
|
|
|
|
=item ge example 8 |
810
|
|
|
|
|
|
|
|
811
|
|
|
|
|
|
|
package main; |
812
|
|
|
|
|
|
|
|
813
|
|
|
|
|
|
|
use Venus::Boolean; |
814
|
|
|
|
|
|
|
use Venus::String; |
815
|
|
|
|
|
|
|
|
816
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
817
|
|
|
|
|
|
|
my $rvalue = Venus::String->new; |
818
|
|
|
|
|
|
|
|
819
|
|
|
|
|
|
|
my $result = $lvalue->ge($rvalue); |
820
|
|
|
|
|
|
|
|
821
|
|
|
|
|
|
|
# 1 |
822
|
|
|
|
|
|
|
|
823
|
|
|
|
|
|
|
=back |
824
|
|
|
|
|
|
|
|
825
|
|
|
|
|
|
|
=over 4 |
826
|
|
|
|
|
|
|
|
827
|
|
|
|
|
|
|
=item ge example 9 |
828
|
|
|
|
|
|
|
|
829
|
|
|
|
|
|
|
package main; |
830
|
|
|
|
|
|
|
|
831
|
|
|
|
|
|
|
use Venus::Boolean; |
832
|
|
|
|
|
|
|
use Venus::Undef; |
833
|
|
|
|
|
|
|
|
834
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
835
|
|
|
|
|
|
|
my $rvalue = Venus::Undef->new; |
836
|
|
|
|
|
|
|
|
837
|
|
|
|
|
|
|
my $result = $lvalue->ge($rvalue); |
838
|
|
|
|
|
|
|
|
839
|
|
|
|
|
|
|
# 1 |
840
|
|
|
|
|
|
|
|
841
|
|
|
|
|
|
|
=back |
842
|
|
|
|
|
|
|
|
843
|
|
|
|
|
|
|
=cut |
844
|
|
|
|
|
|
|
|
845
|
|
|
|
|
|
|
=head2 gele |
846
|
|
|
|
|
|
|
|
847
|
|
|
|
|
|
|
gele(any $arg1, any $arg2) (boolean) |
848
|
|
|
|
|
|
|
|
849
|
|
|
|
|
|
|
The gele method performs a I<"greater-than-or-equal-to"> operation on the 1st |
850
|
|
|
|
|
|
|
argument, and I<"lesser-than-or-equal-to"> operation on the 2nd argument. |
851
|
|
|
|
|
|
|
|
852
|
|
|
|
|
|
|
I> |
853
|
|
|
|
|
|
|
|
854
|
|
|
|
|
|
|
=over 4 |
855
|
|
|
|
|
|
|
|
856
|
|
|
|
|
|
|
=item gele example 1 |
857
|
|
|
|
|
|
|
|
858
|
|
|
|
|
|
|
package main; |
859
|
|
|
|
|
|
|
|
860
|
|
|
|
|
|
|
use Venus::Array; |
861
|
|
|
|
|
|
|
use Venus::Boolean; |
862
|
|
|
|
|
|
|
|
863
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
864
|
|
|
|
|
|
|
my $rvalue = Venus::Array->new; |
865
|
|
|
|
|
|
|
|
866
|
|
|
|
|
|
|
my $result = $lvalue->gele($rvalue); |
867
|
|
|
|
|
|
|
|
868
|
|
|
|
|
|
|
# 0 |
869
|
|
|
|
|
|
|
|
870
|
|
|
|
|
|
|
=back |
871
|
|
|
|
|
|
|
|
872
|
|
|
|
|
|
|
=over 4 |
873
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
=item gele example 2 |
875
|
|
|
|
|
|
|
|
876
|
|
|
|
|
|
|
package main; |
877
|
|
|
|
|
|
|
|
878
|
|
|
|
|
|
|
use Venus::Boolean; |
879
|
|
|
|
|
|
|
|
880
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
881
|
|
|
|
|
|
|
my $rvalue = Venus::Boolean->new; |
882
|
|
|
|
|
|
|
|
883
|
|
|
|
|
|
|
my $result = $lvalue->gele($rvalue); |
884
|
|
|
|
|
|
|
|
885
|
|
|
|
|
|
|
# 1 |
886
|
|
|
|
|
|
|
|
887
|
|
|
|
|
|
|
=back |
888
|
|
|
|
|
|
|
|
889
|
|
|
|
|
|
|
=over 4 |
890
|
|
|
|
|
|
|
|
891
|
|
|
|
|
|
|
=item gele example 3 |
892
|
|
|
|
|
|
|
|
893
|
|
|
|
|
|
|
package main; |
894
|
|
|
|
|
|
|
|
895
|
|
|
|
|
|
|
use Venus::Code; |
896
|
|
|
|
|
|
|
use Venus::Boolean; |
897
|
|
|
|
|
|
|
|
898
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
899
|
|
|
|
|
|
|
my $rvalue = Venus::Code->new; |
900
|
|
|
|
|
|
|
|
901
|
|
|
|
|
|
|
my $result = $lvalue->gele($rvalue); |
902
|
|
|
|
|
|
|
|
903
|
|
|
|
|
|
|
# 0 |
904
|
|
|
|
|
|
|
|
905
|
|
|
|
|
|
|
=back |
906
|
|
|
|
|
|
|
|
907
|
|
|
|
|
|
|
=over 4 |
908
|
|
|
|
|
|
|
|
909
|
|
|
|
|
|
|
=item gele example 4 |
910
|
|
|
|
|
|
|
|
911
|
|
|
|
|
|
|
package main; |
912
|
|
|
|
|
|
|
|
913
|
|
|
|
|
|
|
use Venus::Float; |
914
|
|
|
|
|
|
|
use Venus::Boolean; |
915
|
|
|
|
|
|
|
|
916
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
917
|
|
|
|
|
|
|
my $rvalue = Venus::Number->new; |
918
|
|
|
|
|
|
|
|
919
|
|
|
|
|
|
|
my $result = $lvalue->gele($rvalue); |
920
|
|
|
|
|
|
|
|
921
|
|
|
|
|
|
|
# 1 |
922
|
|
|
|
|
|
|
|
923
|
|
|
|
|
|
|
=back |
924
|
|
|
|
|
|
|
|
925
|
|
|
|
|
|
|
=over 4 |
926
|
|
|
|
|
|
|
|
927
|
|
|
|
|
|
|
=item gele example 5 |
928
|
|
|
|
|
|
|
|
929
|
|
|
|
|
|
|
package main; |
930
|
|
|
|
|
|
|
|
931
|
|
|
|
|
|
|
use Venus::Hash; |
932
|
|
|
|
|
|
|
use Venus::Boolean; |
933
|
|
|
|
|
|
|
|
934
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
935
|
|
|
|
|
|
|
my $rvalue = Venus::Hash->new; |
936
|
|
|
|
|
|
|
|
937
|
|
|
|
|
|
|
my $result = $lvalue->gele($rvalue); |
938
|
|
|
|
|
|
|
|
939
|
|
|
|
|
|
|
# 0 |
940
|
|
|
|
|
|
|
|
941
|
|
|
|
|
|
|
=back |
942
|
|
|
|
|
|
|
|
943
|
|
|
|
|
|
|
=over 4 |
944
|
|
|
|
|
|
|
|
945
|
|
|
|
|
|
|
=item gele example 6 |
946
|
|
|
|
|
|
|
|
947
|
|
|
|
|
|
|
package main; |
948
|
|
|
|
|
|
|
|
949
|
|
|
|
|
|
|
use Venus::Boolean; |
950
|
|
|
|
|
|
|
use Venus::Number; |
951
|
|
|
|
|
|
|
|
952
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
953
|
|
|
|
|
|
|
my $rvalue = Venus::Number->new; |
954
|
|
|
|
|
|
|
|
955
|
|
|
|
|
|
|
my $result = $lvalue->gele($rvalue); |
956
|
|
|
|
|
|
|
|
957
|
|
|
|
|
|
|
# 1 |
958
|
|
|
|
|
|
|
|
959
|
|
|
|
|
|
|
=back |
960
|
|
|
|
|
|
|
|
961
|
|
|
|
|
|
|
=over 4 |
962
|
|
|
|
|
|
|
|
963
|
|
|
|
|
|
|
=item gele example 7 |
964
|
|
|
|
|
|
|
|
965
|
|
|
|
|
|
|
package main; |
966
|
|
|
|
|
|
|
|
967
|
|
|
|
|
|
|
use Venus::Boolean; |
968
|
|
|
|
|
|
|
use Venus::Regexp; |
969
|
|
|
|
|
|
|
|
970
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
971
|
|
|
|
|
|
|
my $rvalue = Venus::Regexp->new; |
972
|
|
|
|
|
|
|
|
973
|
|
|
|
|
|
|
my $result = $lvalue->gele($rvalue); |
974
|
|
|
|
|
|
|
|
975
|
|
|
|
|
|
|
# 0 |
976
|
|
|
|
|
|
|
|
977
|
|
|
|
|
|
|
=back |
978
|
|
|
|
|
|
|
|
979
|
|
|
|
|
|
|
=over 4 |
980
|
|
|
|
|
|
|
|
981
|
|
|
|
|
|
|
=item gele example 8 |
982
|
|
|
|
|
|
|
|
983
|
|
|
|
|
|
|
package main; |
984
|
|
|
|
|
|
|
|
985
|
|
|
|
|
|
|
use Venus::Boolean; |
986
|
|
|
|
|
|
|
use Venus::Scalar; |
987
|
|
|
|
|
|
|
|
988
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
989
|
|
|
|
|
|
|
my $rvalue = Venus::Scalar->new; |
990
|
|
|
|
|
|
|
|
991
|
|
|
|
|
|
|
my $result = $lvalue->gele($rvalue); |
992
|
|
|
|
|
|
|
|
993
|
|
|
|
|
|
|
# 0 |
994
|
|
|
|
|
|
|
|
995
|
|
|
|
|
|
|
=back |
996
|
|
|
|
|
|
|
|
997
|
|
|
|
|
|
|
=over 4 |
998
|
|
|
|
|
|
|
|
999
|
|
|
|
|
|
|
=item gele example 9 |
1000
|
|
|
|
|
|
|
|
1001
|
|
|
|
|
|
|
package main; |
1002
|
|
|
|
|
|
|
|
1003
|
|
|
|
|
|
|
use Venus::Boolean; |
1004
|
|
|
|
|
|
|
use Venus::String; |
1005
|
|
|
|
|
|
|
|
1006
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1007
|
|
|
|
|
|
|
my $rvalue = Venus::String->new; |
1008
|
|
|
|
|
|
|
|
1009
|
|
|
|
|
|
|
my $result = $lvalue->gele($rvalue); |
1010
|
|
|
|
|
|
|
|
1011
|
|
|
|
|
|
|
# 1 |
1012
|
|
|
|
|
|
|
|
1013
|
|
|
|
|
|
|
=back |
1014
|
|
|
|
|
|
|
|
1015
|
|
|
|
|
|
|
=over 4 |
1016
|
|
|
|
|
|
|
|
1017
|
|
|
|
|
|
|
=item gele example 10 |
1018
|
|
|
|
|
|
|
|
1019
|
|
|
|
|
|
|
package main; |
1020
|
|
|
|
|
|
|
|
1021
|
|
|
|
|
|
|
use Venus::Boolean; |
1022
|
|
|
|
|
|
|
use Venus::Undef; |
1023
|
|
|
|
|
|
|
|
1024
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1025
|
|
|
|
|
|
|
my $rvalue = Venus::Undef->new; |
1026
|
|
|
|
|
|
|
|
1027
|
|
|
|
|
|
|
my $result = $lvalue->gele($rvalue); |
1028
|
|
|
|
|
|
|
|
1029
|
|
|
|
|
|
|
# 1 |
1030
|
|
|
|
|
|
|
|
1031
|
|
|
|
|
|
|
=back |
1032
|
|
|
|
|
|
|
|
1033
|
|
|
|
|
|
|
=cut |
1034
|
|
|
|
|
|
|
|
1035
|
|
|
|
|
|
|
=head2 gt |
1036
|
|
|
|
|
|
|
|
1037
|
|
|
|
|
|
|
gt(any $arg) (boolean) |
1038
|
|
|
|
|
|
|
|
1039
|
|
|
|
|
|
|
The gt method performs a I<"greater-than"> operation using the argument provided. |
1040
|
|
|
|
|
|
|
|
1041
|
|
|
|
|
|
|
I> |
1042
|
|
|
|
|
|
|
|
1043
|
|
|
|
|
|
|
=over 4 |
1044
|
|
|
|
|
|
|
|
1045
|
|
|
|
|
|
|
=item gt example 1 |
1046
|
|
|
|
|
|
|
|
1047
|
|
|
|
|
|
|
package main; |
1048
|
|
|
|
|
|
|
|
1049
|
|
|
|
|
|
|
use Venus::Array; |
1050
|
|
|
|
|
|
|
use Venus::Boolean; |
1051
|
|
|
|
|
|
|
|
1052
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1053
|
|
|
|
|
|
|
my $rvalue = Venus::Array->new; |
1054
|
|
|
|
|
|
|
|
1055
|
|
|
|
|
|
|
my $result = $lvalue->gt($rvalue); |
1056
|
|
|
|
|
|
|
|
1057
|
|
|
|
|
|
|
# 0 |
1058
|
|
|
|
|
|
|
|
1059
|
|
|
|
|
|
|
=back |
1060
|
|
|
|
|
|
|
|
1061
|
|
|
|
|
|
|
=over 4 |
1062
|
|
|
|
|
|
|
|
1063
|
|
|
|
|
|
|
=item gt example 2 |
1064
|
|
|
|
|
|
|
|
1065
|
|
|
|
|
|
|
package main; |
1066
|
|
|
|
|
|
|
|
1067
|
|
|
|
|
|
|
use Venus::Boolean; |
1068
|
|
|
|
|
|
|
|
1069
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1070
|
|
|
|
|
|
|
my $rvalue = Venus::Boolean->new; |
1071
|
|
|
|
|
|
|
|
1072
|
|
|
|
|
|
|
my $result = $lvalue->gt($rvalue); |
1073
|
|
|
|
|
|
|
|
1074
|
|
|
|
|
|
|
# 0 |
1075
|
|
|
|
|
|
|
|
1076
|
|
|
|
|
|
|
=back |
1077
|
|
|
|
|
|
|
|
1078
|
|
|
|
|
|
|
=over 4 |
1079
|
|
|
|
|
|
|
|
1080
|
|
|
|
|
|
|
=item gt example 3 |
1081
|
|
|
|
|
|
|
|
1082
|
|
|
|
|
|
|
package main; |
1083
|
|
|
|
|
|
|
|
1084
|
|
|
|
|
|
|
use Venus::Code; |
1085
|
|
|
|
|
|
|
use Venus::Boolean; |
1086
|
|
|
|
|
|
|
|
1087
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1088
|
|
|
|
|
|
|
my $rvalue = Venus::Code->new; |
1089
|
|
|
|
|
|
|
|
1090
|
|
|
|
|
|
|
my $result = $lvalue->gt($rvalue); |
1091
|
|
|
|
|
|
|
|
1092
|
|
|
|
|
|
|
# 0 |
1093
|
|
|
|
|
|
|
|
1094
|
|
|
|
|
|
|
=back |
1095
|
|
|
|
|
|
|
|
1096
|
|
|
|
|
|
|
=over 4 |
1097
|
|
|
|
|
|
|
|
1098
|
|
|
|
|
|
|
=item gt example 4 |
1099
|
|
|
|
|
|
|
|
1100
|
|
|
|
|
|
|
package main; |
1101
|
|
|
|
|
|
|
|
1102
|
|
|
|
|
|
|
use Venus::Float; |
1103
|
|
|
|
|
|
|
use Venus::Boolean; |
1104
|
|
|
|
|
|
|
|
1105
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1106
|
|
|
|
|
|
|
my $rvalue = Venus::Float->new; |
1107
|
|
|
|
|
|
|
|
1108
|
|
|
|
|
|
|
my $result = $lvalue->gt($rvalue); |
1109
|
|
|
|
|
|
|
|
1110
|
|
|
|
|
|
|
# 0 |
1111
|
|
|
|
|
|
|
|
1112
|
|
|
|
|
|
|
=back |
1113
|
|
|
|
|
|
|
|
1114
|
|
|
|
|
|
|
=over 4 |
1115
|
|
|
|
|
|
|
|
1116
|
|
|
|
|
|
|
=item gt example 5 |
1117
|
|
|
|
|
|
|
|
1118
|
|
|
|
|
|
|
package main; |
1119
|
|
|
|
|
|
|
|
1120
|
|
|
|
|
|
|
use Venus::Hash; |
1121
|
|
|
|
|
|
|
use Venus::Boolean; |
1122
|
|
|
|
|
|
|
|
1123
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1124
|
|
|
|
|
|
|
my $rvalue = Venus::Hash->new; |
1125
|
|
|
|
|
|
|
|
1126
|
|
|
|
|
|
|
my $result = $lvalue->gt($rvalue); |
1127
|
|
|
|
|
|
|
|
1128
|
|
|
|
|
|
|
# 0 |
1129
|
|
|
|
|
|
|
|
1130
|
|
|
|
|
|
|
=back |
1131
|
|
|
|
|
|
|
|
1132
|
|
|
|
|
|
|
=over 4 |
1133
|
|
|
|
|
|
|
|
1134
|
|
|
|
|
|
|
=item gt example 6 |
1135
|
|
|
|
|
|
|
|
1136
|
|
|
|
|
|
|
package main; |
1137
|
|
|
|
|
|
|
|
1138
|
|
|
|
|
|
|
use Venus::Boolean; |
1139
|
|
|
|
|
|
|
use Venus::Number; |
1140
|
|
|
|
|
|
|
|
1141
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1142
|
|
|
|
|
|
|
my $rvalue = Venus::Number->new; |
1143
|
|
|
|
|
|
|
|
1144
|
|
|
|
|
|
|
my $result = $lvalue->gt($rvalue); |
1145
|
|
|
|
|
|
|
|
1146
|
|
|
|
|
|
|
# 0 |
1147
|
|
|
|
|
|
|
|
1148
|
|
|
|
|
|
|
=back |
1149
|
|
|
|
|
|
|
|
1150
|
|
|
|
|
|
|
=over 4 |
1151
|
|
|
|
|
|
|
|
1152
|
|
|
|
|
|
|
=item gt example 7 |
1153
|
|
|
|
|
|
|
|
1154
|
|
|
|
|
|
|
package main; |
1155
|
|
|
|
|
|
|
|
1156
|
|
|
|
|
|
|
use Venus::Boolean; |
1157
|
|
|
|
|
|
|
use Venus::Regexp; |
1158
|
|
|
|
|
|
|
|
1159
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1160
|
|
|
|
|
|
|
my $rvalue = Venus::Regexp->new; |
1161
|
|
|
|
|
|
|
|
1162
|
|
|
|
|
|
|
my $result = $lvalue->gt($rvalue); |
1163
|
|
|
|
|
|
|
|
1164
|
|
|
|
|
|
|
# 0 |
1165
|
|
|
|
|
|
|
|
1166
|
|
|
|
|
|
|
=back |
1167
|
|
|
|
|
|
|
|
1168
|
|
|
|
|
|
|
=over 4 |
1169
|
|
|
|
|
|
|
|
1170
|
|
|
|
|
|
|
=item gt example 8 |
1171
|
|
|
|
|
|
|
|
1172
|
|
|
|
|
|
|
package main; |
1173
|
|
|
|
|
|
|
|
1174
|
|
|
|
|
|
|
use Venus::Boolean; |
1175
|
|
|
|
|
|
|
use Venus::Scalar; |
1176
|
|
|
|
|
|
|
|
1177
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1178
|
|
|
|
|
|
|
my $rvalue = Venus::Scalar->new; |
1179
|
|
|
|
|
|
|
|
1180
|
|
|
|
|
|
|
my $result = $lvalue->gt($rvalue); |
1181
|
|
|
|
|
|
|
|
1182
|
|
|
|
|
|
|
# 0 |
1183
|
|
|
|
|
|
|
|
1184
|
|
|
|
|
|
|
=back |
1185
|
|
|
|
|
|
|
|
1186
|
|
|
|
|
|
|
=over 4 |
1187
|
|
|
|
|
|
|
|
1188
|
|
|
|
|
|
|
=item gt example 9 |
1189
|
|
|
|
|
|
|
|
1190
|
|
|
|
|
|
|
package main; |
1191
|
|
|
|
|
|
|
|
1192
|
|
|
|
|
|
|
use Venus::Boolean; |
1193
|
|
|
|
|
|
|
use Venus::String; |
1194
|
|
|
|
|
|
|
|
1195
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1196
|
|
|
|
|
|
|
my $rvalue = Venus::String->new; |
1197
|
|
|
|
|
|
|
|
1198
|
|
|
|
|
|
|
my $result = $lvalue->gt($rvalue); |
1199
|
|
|
|
|
|
|
|
1200
|
|
|
|
|
|
|
# 0 |
1201
|
|
|
|
|
|
|
|
1202
|
|
|
|
|
|
|
=back |
1203
|
|
|
|
|
|
|
|
1204
|
|
|
|
|
|
|
=over 4 |
1205
|
|
|
|
|
|
|
|
1206
|
|
|
|
|
|
|
=item gt example 10 |
1207
|
|
|
|
|
|
|
|
1208
|
|
|
|
|
|
|
package main; |
1209
|
|
|
|
|
|
|
|
1210
|
|
|
|
|
|
|
use Venus::Boolean; |
1211
|
|
|
|
|
|
|
use Venus::Undef; |
1212
|
|
|
|
|
|
|
|
1213
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1214
|
|
|
|
|
|
|
my $rvalue = Venus::Undef->new; |
1215
|
|
|
|
|
|
|
|
1216
|
|
|
|
|
|
|
my $result = $lvalue->gt($rvalue); |
1217
|
|
|
|
|
|
|
|
1218
|
|
|
|
|
|
|
# 0 |
1219
|
|
|
|
|
|
|
|
1220
|
|
|
|
|
|
|
=back |
1221
|
|
|
|
|
|
|
|
1222
|
|
|
|
|
|
|
=cut |
1223
|
|
|
|
|
|
|
|
1224
|
|
|
|
|
|
|
=head2 gtlt |
1225
|
|
|
|
|
|
|
|
1226
|
|
|
|
|
|
|
gtlt(any $arg1, any $arg2) (boolean) |
1227
|
|
|
|
|
|
|
|
1228
|
|
|
|
|
|
|
The gtlt method performs a I<"greater-than"> operation on the 1st argument, and |
1229
|
|
|
|
|
|
|
I<"lesser-than"> operation on the 2nd argument. |
1230
|
|
|
|
|
|
|
|
1231
|
|
|
|
|
|
|
I> |
1232
|
|
|
|
|
|
|
|
1233
|
|
|
|
|
|
|
=over 4 |
1234
|
|
|
|
|
|
|
|
1235
|
|
|
|
|
|
|
=item gtlt example 1 |
1236
|
|
|
|
|
|
|
|
1237
|
|
|
|
|
|
|
package main; |
1238
|
|
|
|
|
|
|
|
1239
|
|
|
|
|
|
|
use Venus::Array; |
1240
|
|
|
|
|
|
|
use Venus::Boolean; |
1241
|
|
|
|
|
|
|
|
1242
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1243
|
|
|
|
|
|
|
my $rvalue = Venus::Array->new; |
1244
|
|
|
|
|
|
|
|
1245
|
|
|
|
|
|
|
my $result = $lvalue->gtlt($rvalue); |
1246
|
|
|
|
|
|
|
|
1247
|
|
|
|
|
|
|
# 0 |
1248
|
|
|
|
|
|
|
|
1249
|
|
|
|
|
|
|
=back |
1250
|
|
|
|
|
|
|
|
1251
|
|
|
|
|
|
|
=over 4 |
1252
|
|
|
|
|
|
|
|
1253
|
|
|
|
|
|
|
=item gtlt example 2 |
1254
|
|
|
|
|
|
|
|
1255
|
|
|
|
|
|
|
package main; |
1256
|
|
|
|
|
|
|
|
1257
|
|
|
|
|
|
|
use Venus::Boolean; |
1258
|
|
|
|
|
|
|
|
1259
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1260
|
|
|
|
|
|
|
my $rvalue = Venus::Boolean->new; |
1261
|
|
|
|
|
|
|
|
1262
|
|
|
|
|
|
|
my $result = $lvalue->gtlt($rvalue); |
1263
|
|
|
|
|
|
|
|
1264
|
|
|
|
|
|
|
# 0 |
1265
|
|
|
|
|
|
|
|
1266
|
|
|
|
|
|
|
=back |
1267
|
|
|
|
|
|
|
|
1268
|
|
|
|
|
|
|
=over 4 |
1269
|
|
|
|
|
|
|
|
1270
|
|
|
|
|
|
|
=item gtlt example 3 |
1271
|
|
|
|
|
|
|
|
1272
|
|
|
|
|
|
|
package main; |
1273
|
|
|
|
|
|
|
|
1274
|
|
|
|
|
|
|
use Venus::Code; |
1275
|
|
|
|
|
|
|
use Venus::Boolean; |
1276
|
|
|
|
|
|
|
|
1277
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1278
|
|
|
|
|
|
|
my $rvalue = Venus::Code->new; |
1279
|
|
|
|
|
|
|
|
1280
|
|
|
|
|
|
|
my $result = $lvalue->gtlt($rvalue); |
1281
|
|
|
|
|
|
|
|
1282
|
|
|
|
|
|
|
# 0 |
1283
|
|
|
|
|
|
|
|
1284
|
|
|
|
|
|
|
=back |
1285
|
|
|
|
|
|
|
|
1286
|
|
|
|
|
|
|
=over 4 |
1287
|
|
|
|
|
|
|
|
1288
|
|
|
|
|
|
|
=item gtlt example 4 |
1289
|
|
|
|
|
|
|
|
1290
|
|
|
|
|
|
|
package main; |
1291
|
|
|
|
|
|
|
|
1292
|
|
|
|
|
|
|
use Venus::Float; |
1293
|
|
|
|
|
|
|
use Venus::Boolean; |
1294
|
|
|
|
|
|
|
|
1295
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1296
|
|
|
|
|
|
|
my $rvalue = Venus::Float->new; |
1297
|
|
|
|
|
|
|
|
1298
|
|
|
|
|
|
|
my $result = $lvalue->gtlt($rvalue); |
1299
|
|
|
|
|
|
|
|
1300
|
|
|
|
|
|
|
# 0 |
1301
|
|
|
|
|
|
|
|
1302
|
|
|
|
|
|
|
=back |
1303
|
|
|
|
|
|
|
|
1304
|
|
|
|
|
|
|
=over 4 |
1305
|
|
|
|
|
|
|
|
1306
|
|
|
|
|
|
|
=item gtlt example 5 |
1307
|
|
|
|
|
|
|
|
1308
|
|
|
|
|
|
|
package main; |
1309
|
|
|
|
|
|
|
|
1310
|
|
|
|
|
|
|
use Venus::Hash; |
1311
|
|
|
|
|
|
|
use Venus::Boolean; |
1312
|
|
|
|
|
|
|
|
1313
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1314
|
|
|
|
|
|
|
my $rvalue = Venus::Hash->new; |
1315
|
|
|
|
|
|
|
|
1316
|
|
|
|
|
|
|
my $result = $lvalue->gtlt($rvalue); |
1317
|
|
|
|
|
|
|
|
1318
|
|
|
|
|
|
|
# 0 |
1319
|
|
|
|
|
|
|
|
1320
|
|
|
|
|
|
|
=back |
1321
|
|
|
|
|
|
|
|
1322
|
|
|
|
|
|
|
=over 4 |
1323
|
|
|
|
|
|
|
|
1324
|
|
|
|
|
|
|
=item gtlt example 6 |
1325
|
|
|
|
|
|
|
|
1326
|
|
|
|
|
|
|
package main; |
1327
|
|
|
|
|
|
|
|
1328
|
|
|
|
|
|
|
use Venus::Boolean; |
1329
|
|
|
|
|
|
|
use Venus::Number; |
1330
|
|
|
|
|
|
|
|
1331
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1332
|
|
|
|
|
|
|
my $rvalue = Venus::Number->new; |
1333
|
|
|
|
|
|
|
|
1334
|
|
|
|
|
|
|
my $result = $lvalue->gtlt($rvalue); |
1335
|
|
|
|
|
|
|
|
1336
|
|
|
|
|
|
|
# 0 |
1337
|
|
|
|
|
|
|
|
1338
|
|
|
|
|
|
|
=back |
1339
|
|
|
|
|
|
|
|
1340
|
|
|
|
|
|
|
=over 4 |
1341
|
|
|
|
|
|
|
|
1342
|
|
|
|
|
|
|
=item gtlt example 7 |
1343
|
|
|
|
|
|
|
|
1344
|
|
|
|
|
|
|
package main; |
1345
|
|
|
|
|
|
|
|
1346
|
|
|
|
|
|
|
use Venus::Boolean; |
1347
|
|
|
|
|
|
|
use Venus::Regexp; |
1348
|
|
|
|
|
|
|
|
1349
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1350
|
|
|
|
|
|
|
my $rvalue = Venus::Regexp->new; |
1351
|
|
|
|
|
|
|
|
1352
|
|
|
|
|
|
|
my $result = $lvalue->gtlt($rvalue); |
1353
|
|
|
|
|
|
|
|
1354
|
|
|
|
|
|
|
# 0 |
1355
|
|
|
|
|
|
|
|
1356
|
|
|
|
|
|
|
=back |
1357
|
|
|
|
|
|
|
|
1358
|
|
|
|
|
|
|
=over 4 |
1359
|
|
|
|
|
|
|
|
1360
|
|
|
|
|
|
|
=item gtlt example 8 |
1361
|
|
|
|
|
|
|
|
1362
|
|
|
|
|
|
|
package main; |
1363
|
|
|
|
|
|
|
|
1364
|
|
|
|
|
|
|
use Venus::Boolean; |
1365
|
|
|
|
|
|
|
use Venus::Scalar; |
1366
|
|
|
|
|
|
|
|
1367
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1368
|
|
|
|
|
|
|
my $rvalue = Venus::Scalar->new; |
1369
|
|
|
|
|
|
|
|
1370
|
|
|
|
|
|
|
my $result = $lvalue->gtlt($rvalue); |
1371
|
|
|
|
|
|
|
|
1372
|
|
|
|
|
|
|
# 0 |
1373
|
|
|
|
|
|
|
|
1374
|
|
|
|
|
|
|
=back |
1375
|
|
|
|
|
|
|
|
1376
|
|
|
|
|
|
|
=over 4 |
1377
|
|
|
|
|
|
|
|
1378
|
|
|
|
|
|
|
=item gtlt example 9 |
1379
|
|
|
|
|
|
|
|
1380
|
|
|
|
|
|
|
package main; |
1381
|
|
|
|
|
|
|
|
1382
|
|
|
|
|
|
|
use Venus::Boolean; |
1383
|
|
|
|
|
|
|
use Venus::String; |
1384
|
|
|
|
|
|
|
|
1385
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1386
|
|
|
|
|
|
|
my $rvalue = Venus::String->new; |
1387
|
|
|
|
|
|
|
|
1388
|
|
|
|
|
|
|
my $result = $lvalue->gtlt($rvalue); |
1389
|
|
|
|
|
|
|
|
1390
|
|
|
|
|
|
|
# 0 |
1391
|
|
|
|
|
|
|
|
1392
|
|
|
|
|
|
|
=back |
1393
|
|
|
|
|
|
|
|
1394
|
|
|
|
|
|
|
=over 4 |
1395
|
|
|
|
|
|
|
|
1396
|
|
|
|
|
|
|
=item gtlt example 10 |
1397
|
|
|
|
|
|
|
|
1398
|
|
|
|
|
|
|
package main; |
1399
|
|
|
|
|
|
|
|
1400
|
|
|
|
|
|
|
use Venus::Boolean; |
1401
|
|
|
|
|
|
|
use Venus::Undef; |
1402
|
|
|
|
|
|
|
|
1403
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1404
|
|
|
|
|
|
|
my $rvalue = Venus::Undef->new; |
1405
|
|
|
|
|
|
|
|
1406
|
|
|
|
|
|
|
my $result = $lvalue->gtlt($rvalue); |
1407
|
|
|
|
|
|
|
|
1408
|
|
|
|
|
|
|
# 0 |
1409
|
|
|
|
|
|
|
|
1410
|
|
|
|
|
|
|
=back |
1411
|
|
|
|
|
|
|
|
1412
|
|
|
|
|
|
|
=cut |
1413
|
|
|
|
|
|
|
|
1414
|
|
|
|
|
|
|
=head2 is_false |
1415
|
|
|
|
|
|
|
|
1416
|
|
|
|
|
|
|
is_false() (boolean) |
1417
|
|
|
|
|
|
|
|
1418
|
|
|
|
|
|
|
The is_false method returns C if the boolean is falsy, otherwise returns |
1419
|
|
|
|
|
|
|
C. |
1420
|
|
|
|
|
|
|
|
1421
|
|
|
|
|
|
|
I> |
1422
|
|
|
|
|
|
|
|
1423
|
|
|
|
|
|
|
=over 4 |
1424
|
|
|
|
|
|
|
|
1425
|
|
|
|
|
|
|
=item is_false example 1 |
1426
|
|
|
|
|
|
|
|
1427
|
|
|
|
|
|
|
# given: synopsis; |
1428
|
|
|
|
|
|
|
|
1429
|
|
|
|
|
|
|
my $is_false = $boolean->is_false; |
1430
|
|
|
|
|
|
|
|
1431
|
|
|
|
|
|
|
# 1 |
1432
|
|
|
|
|
|
|
|
1433
|
|
|
|
|
|
|
=back |
1434
|
|
|
|
|
|
|
|
1435
|
|
|
|
|
|
|
=cut |
1436
|
|
|
|
|
|
|
|
1437
|
|
|
|
|
|
|
=head2 is_true |
1438
|
|
|
|
|
|
|
|
1439
|
|
|
|
|
|
|
is_true() (boolean) |
1440
|
|
|
|
|
|
|
|
1441
|
|
|
|
|
|
|
The is_true method returns C if the boolean is truthy, otherwise returns |
1442
|
|
|
|
|
|
|
C. |
1443
|
|
|
|
|
|
|
|
1444
|
|
|
|
|
|
|
I> |
1445
|
|
|
|
|
|
|
|
1446
|
|
|
|
|
|
|
=over 4 |
1447
|
|
|
|
|
|
|
|
1448
|
|
|
|
|
|
|
=item is_true example 1 |
1449
|
|
|
|
|
|
|
|
1450
|
|
|
|
|
|
|
# given: synopsis; |
1451
|
|
|
|
|
|
|
|
1452
|
|
|
|
|
|
|
my $is_true = $boolean->is_true; |
1453
|
|
|
|
|
|
|
|
1454
|
|
|
|
|
|
|
# 0 |
1455
|
|
|
|
|
|
|
|
1456
|
|
|
|
|
|
|
=back |
1457
|
|
|
|
|
|
|
|
1458
|
|
|
|
|
|
|
=cut |
1459
|
|
|
|
|
|
|
|
1460
|
|
|
|
|
|
|
=head2 le |
1461
|
|
|
|
|
|
|
|
1462
|
|
|
|
|
|
|
le(any $arg) (boolean) |
1463
|
|
|
|
|
|
|
|
1464
|
|
|
|
|
|
|
The le method performs a I<"lesser-than-or-equal-to"> operation using the |
1465
|
|
|
|
|
|
|
argument provided. |
1466
|
|
|
|
|
|
|
|
1467
|
|
|
|
|
|
|
I> |
1468
|
|
|
|
|
|
|
|
1469
|
|
|
|
|
|
|
=over 4 |
1470
|
|
|
|
|
|
|
|
1471
|
|
|
|
|
|
|
=item le example 1 |
1472
|
|
|
|
|
|
|
|
1473
|
|
|
|
|
|
|
package main; |
1474
|
|
|
|
|
|
|
|
1475
|
|
|
|
|
|
|
use Venus::Array; |
1476
|
|
|
|
|
|
|
use Venus::Boolean; |
1477
|
|
|
|
|
|
|
|
1478
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1479
|
|
|
|
|
|
|
my $rvalue = Venus::Array->new; |
1480
|
|
|
|
|
|
|
|
1481
|
|
|
|
|
|
|
my $result = $lvalue->le($rvalue); |
1482
|
|
|
|
|
|
|
|
1483
|
|
|
|
|
|
|
# 1 |
1484
|
|
|
|
|
|
|
|
1485
|
|
|
|
|
|
|
=back |
1486
|
|
|
|
|
|
|
|
1487
|
|
|
|
|
|
|
=over 4 |
1488
|
|
|
|
|
|
|
|
1489
|
|
|
|
|
|
|
=item le example 2 |
1490
|
|
|
|
|
|
|
|
1491
|
|
|
|
|
|
|
package main; |
1492
|
|
|
|
|
|
|
|
1493
|
|
|
|
|
|
|
use Venus::Boolean; |
1494
|
|
|
|
|
|
|
|
1495
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1496
|
|
|
|
|
|
|
my $rvalue = Venus::Boolean->new; |
1497
|
|
|
|
|
|
|
|
1498
|
|
|
|
|
|
|
my $result = $lvalue->le($rvalue); |
1499
|
|
|
|
|
|
|
|
1500
|
|
|
|
|
|
|
# 1 |
1501
|
|
|
|
|
|
|
|
1502
|
|
|
|
|
|
|
=back |
1503
|
|
|
|
|
|
|
|
1504
|
|
|
|
|
|
|
=over 4 |
1505
|
|
|
|
|
|
|
|
1506
|
|
|
|
|
|
|
=item le example 3 |
1507
|
|
|
|
|
|
|
|
1508
|
|
|
|
|
|
|
package main; |
1509
|
|
|
|
|
|
|
|
1510
|
|
|
|
|
|
|
use Venus::Code; |
1511
|
|
|
|
|
|
|
use Venus::Boolean; |
1512
|
|
|
|
|
|
|
|
1513
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1514
|
|
|
|
|
|
|
my $rvalue = Venus::Code->new; |
1515
|
|
|
|
|
|
|
|
1516
|
|
|
|
|
|
|
my $result = $lvalue->le($rvalue); |
1517
|
|
|
|
|
|
|
|
1518
|
|
|
|
|
|
|
# 1 |
1519
|
|
|
|
|
|
|
|
1520
|
|
|
|
|
|
|
=back |
1521
|
|
|
|
|
|
|
|
1522
|
|
|
|
|
|
|
=over 4 |
1523
|
|
|
|
|
|
|
|
1524
|
|
|
|
|
|
|
=item le example 4 |
1525
|
|
|
|
|
|
|
|
1526
|
|
|
|
|
|
|
package main; |
1527
|
|
|
|
|
|
|
|
1528
|
|
|
|
|
|
|
use Venus::Float; |
1529
|
|
|
|
|
|
|
use Venus::Boolean; |
1530
|
|
|
|
|
|
|
|
1531
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1532
|
|
|
|
|
|
|
my $rvalue = Venus::Float->new; |
1533
|
|
|
|
|
|
|
|
1534
|
|
|
|
|
|
|
my $result = $lvalue->le($rvalue); |
1535
|
|
|
|
|
|
|
|
1536
|
|
|
|
|
|
|
# 1 |
1537
|
|
|
|
|
|
|
|
1538
|
|
|
|
|
|
|
=back |
1539
|
|
|
|
|
|
|
|
1540
|
|
|
|
|
|
|
=over 4 |
1541
|
|
|
|
|
|
|
|
1542
|
|
|
|
|
|
|
=item le example 5 |
1543
|
|
|
|
|
|
|
|
1544
|
|
|
|
|
|
|
package main; |
1545
|
|
|
|
|
|
|
|
1546
|
|
|
|
|
|
|
use Venus::Hash; |
1547
|
|
|
|
|
|
|
use Venus::Boolean; |
1548
|
|
|
|
|
|
|
|
1549
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1550
|
|
|
|
|
|
|
my $rvalue = Venus::Hash->new; |
1551
|
|
|
|
|
|
|
|
1552
|
|
|
|
|
|
|
my $result = $lvalue->le($rvalue); |
1553
|
|
|
|
|
|
|
|
1554
|
|
|
|
|
|
|
# 1 |
1555
|
|
|
|
|
|
|
|
1556
|
|
|
|
|
|
|
=back |
1557
|
|
|
|
|
|
|
|
1558
|
|
|
|
|
|
|
=over 4 |
1559
|
|
|
|
|
|
|
|
1560
|
|
|
|
|
|
|
=item le example 6 |
1561
|
|
|
|
|
|
|
|
1562
|
|
|
|
|
|
|
package main; |
1563
|
|
|
|
|
|
|
|
1564
|
|
|
|
|
|
|
use Venus::Boolean; |
1565
|
|
|
|
|
|
|
use Venus::Number; |
1566
|
|
|
|
|
|
|
|
1567
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1568
|
|
|
|
|
|
|
my $rvalue = Venus::Number->new; |
1569
|
|
|
|
|
|
|
|
1570
|
|
|
|
|
|
|
my $result = $lvalue->le($rvalue); |
1571
|
|
|
|
|
|
|
|
1572
|
|
|
|
|
|
|
# 1 |
1573
|
|
|
|
|
|
|
|
1574
|
|
|
|
|
|
|
=back |
1575
|
|
|
|
|
|
|
|
1576
|
|
|
|
|
|
|
=over 4 |
1577
|
|
|
|
|
|
|
|
1578
|
|
|
|
|
|
|
=item le example 7 |
1579
|
|
|
|
|
|
|
|
1580
|
|
|
|
|
|
|
package main; |
1581
|
|
|
|
|
|
|
|
1582
|
|
|
|
|
|
|
use Venus::Boolean; |
1583
|
|
|
|
|
|
|
use Venus::Regexp; |
1584
|
|
|
|
|
|
|
|
1585
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1586
|
|
|
|
|
|
|
my $rvalue = Venus::Regexp->new; |
1587
|
|
|
|
|
|
|
|
1588
|
|
|
|
|
|
|
my $result = $lvalue->le($rvalue); |
1589
|
|
|
|
|
|
|
|
1590
|
|
|
|
|
|
|
# 1 |
1591
|
|
|
|
|
|
|
|
1592
|
|
|
|
|
|
|
=back |
1593
|
|
|
|
|
|
|
|
1594
|
|
|
|
|
|
|
=over 4 |
1595
|
|
|
|
|
|
|
|
1596
|
|
|
|
|
|
|
=item le example 8 |
1597
|
|
|
|
|
|
|
|
1598
|
|
|
|
|
|
|
package main; |
1599
|
|
|
|
|
|
|
|
1600
|
|
|
|
|
|
|
use Venus::Boolean; |
1601
|
|
|
|
|
|
|
use Venus::Scalar; |
1602
|
|
|
|
|
|
|
|
1603
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1604
|
|
|
|
|
|
|
my $rvalue = Venus::Scalar->new; |
1605
|
|
|
|
|
|
|
|
1606
|
|
|
|
|
|
|
my $result = $lvalue->le($rvalue); |
1607
|
|
|
|
|
|
|
|
1608
|
|
|
|
|
|
|
# 1 |
1609
|
|
|
|
|
|
|
|
1610
|
|
|
|
|
|
|
=back |
1611
|
|
|
|
|
|
|
|
1612
|
|
|
|
|
|
|
=over 4 |
1613
|
|
|
|
|
|
|
|
1614
|
|
|
|
|
|
|
=item le example 9 |
1615
|
|
|
|
|
|
|
|
1616
|
|
|
|
|
|
|
package main; |
1617
|
|
|
|
|
|
|
|
1618
|
|
|
|
|
|
|
use Venus::Boolean; |
1619
|
|
|
|
|
|
|
use Venus::String; |
1620
|
|
|
|
|
|
|
|
1621
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1622
|
|
|
|
|
|
|
my $rvalue = Venus::String->new; |
1623
|
|
|
|
|
|
|
|
1624
|
|
|
|
|
|
|
my $result = $lvalue->le($rvalue); |
1625
|
|
|
|
|
|
|
|
1626
|
|
|
|
|
|
|
# 1 |
1627
|
|
|
|
|
|
|
|
1628
|
|
|
|
|
|
|
=back |
1629
|
|
|
|
|
|
|
|
1630
|
|
|
|
|
|
|
=over 4 |
1631
|
|
|
|
|
|
|
|
1632
|
|
|
|
|
|
|
=item le example 10 |
1633
|
|
|
|
|
|
|
|
1634
|
|
|
|
|
|
|
package main; |
1635
|
|
|
|
|
|
|
|
1636
|
|
|
|
|
|
|
use Venus::Boolean; |
1637
|
|
|
|
|
|
|
use Venus::Undef; |
1638
|
|
|
|
|
|
|
|
1639
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1640
|
|
|
|
|
|
|
my $rvalue = Venus::Undef->new; |
1641
|
|
|
|
|
|
|
|
1642
|
|
|
|
|
|
|
my $result = $lvalue->le($rvalue); |
1643
|
|
|
|
|
|
|
|
1644
|
|
|
|
|
|
|
# 1 |
1645
|
|
|
|
|
|
|
|
1646
|
|
|
|
|
|
|
=back |
1647
|
|
|
|
|
|
|
|
1648
|
|
|
|
|
|
|
=cut |
1649
|
|
|
|
|
|
|
|
1650
|
|
|
|
|
|
|
=head2 lt |
1651
|
|
|
|
|
|
|
|
1652
|
|
|
|
|
|
|
lt(any $arg) (boolean) |
1653
|
|
|
|
|
|
|
|
1654
|
|
|
|
|
|
|
The lt method performs a I<"lesser-than"> operation using the argument provided. |
1655
|
|
|
|
|
|
|
|
1656
|
|
|
|
|
|
|
I> |
1657
|
|
|
|
|
|
|
|
1658
|
|
|
|
|
|
|
=over 4 |
1659
|
|
|
|
|
|
|
|
1660
|
|
|
|
|
|
|
=item lt example 1 |
1661
|
|
|
|
|
|
|
|
1662
|
|
|
|
|
|
|
package main; |
1663
|
|
|
|
|
|
|
|
1664
|
|
|
|
|
|
|
use Venus::Array; |
1665
|
|
|
|
|
|
|
use Venus::Boolean; |
1666
|
|
|
|
|
|
|
|
1667
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1668
|
|
|
|
|
|
|
my $rvalue = Venus::Array->new; |
1669
|
|
|
|
|
|
|
|
1670
|
|
|
|
|
|
|
my $result = $lvalue->lt($rvalue); |
1671
|
|
|
|
|
|
|
|
1672
|
|
|
|
|
|
|
# 1 |
1673
|
|
|
|
|
|
|
|
1674
|
|
|
|
|
|
|
=back |
1675
|
|
|
|
|
|
|
|
1676
|
|
|
|
|
|
|
=over 4 |
1677
|
|
|
|
|
|
|
|
1678
|
|
|
|
|
|
|
=item lt example 2 |
1679
|
|
|
|
|
|
|
|
1680
|
|
|
|
|
|
|
package main; |
1681
|
|
|
|
|
|
|
|
1682
|
|
|
|
|
|
|
use Venus::Boolean; |
1683
|
|
|
|
|
|
|
|
1684
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1685
|
|
|
|
|
|
|
my $rvalue = Venus::Boolean->new; |
1686
|
|
|
|
|
|
|
|
1687
|
|
|
|
|
|
|
my $result = $lvalue->lt($rvalue); |
1688
|
|
|
|
|
|
|
|
1689
|
|
|
|
|
|
|
# 0 |
1690
|
|
|
|
|
|
|
|
1691
|
|
|
|
|
|
|
=back |
1692
|
|
|
|
|
|
|
|
1693
|
|
|
|
|
|
|
=over 4 |
1694
|
|
|
|
|
|
|
|
1695
|
|
|
|
|
|
|
=item lt example 3 |
1696
|
|
|
|
|
|
|
|
1697
|
|
|
|
|
|
|
package main; |
1698
|
|
|
|
|
|
|
|
1699
|
|
|
|
|
|
|
use Venus::Code; |
1700
|
|
|
|
|
|
|
use Venus::Boolean; |
1701
|
|
|
|
|
|
|
|
1702
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1703
|
|
|
|
|
|
|
my $rvalue = Venus::Code->new; |
1704
|
|
|
|
|
|
|
|
1705
|
|
|
|
|
|
|
my $result = $lvalue->lt($rvalue); |
1706
|
|
|
|
|
|
|
|
1707
|
|
|
|
|
|
|
# 1 |
1708
|
|
|
|
|
|
|
|
1709
|
|
|
|
|
|
|
=back |
1710
|
|
|
|
|
|
|
|
1711
|
|
|
|
|
|
|
=over 4 |
1712
|
|
|
|
|
|
|
|
1713
|
|
|
|
|
|
|
=item lt example 4 |
1714
|
|
|
|
|
|
|
|
1715
|
|
|
|
|
|
|
package main; |
1716
|
|
|
|
|
|
|
|
1717
|
|
|
|
|
|
|
use Venus::Float; |
1718
|
|
|
|
|
|
|
use Venus::Boolean; |
1719
|
|
|
|
|
|
|
|
1720
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1721
|
|
|
|
|
|
|
my $rvalue = Venus::Float->new; |
1722
|
|
|
|
|
|
|
|
1723
|
|
|
|
|
|
|
my $result = $lvalue->lt($rvalue); |
1724
|
|
|
|
|
|
|
|
1725
|
|
|
|
|
|
|
# 0 |
1726
|
|
|
|
|
|
|
|
1727
|
|
|
|
|
|
|
=back |
1728
|
|
|
|
|
|
|
|
1729
|
|
|
|
|
|
|
=over 4 |
1730
|
|
|
|
|
|
|
|
1731
|
|
|
|
|
|
|
=item lt example 5 |
1732
|
|
|
|
|
|
|
|
1733
|
|
|
|
|
|
|
package main; |
1734
|
|
|
|
|
|
|
|
1735
|
|
|
|
|
|
|
use Venus::Hash; |
1736
|
|
|
|
|
|
|
use Venus::Boolean; |
1737
|
|
|
|
|
|
|
|
1738
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1739
|
|
|
|
|
|
|
my $rvalue = Venus::Hash->new; |
1740
|
|
|
|
|
|
|
|
1741
|
|
|
|
|
|
|
my $result = $lvalue->lt($rvalue); |
1742
|
|
|
|
|
|
|
|
1743
|
|
|
|
|
|
|
# 1 |
1744
|
|
|
|
|
|
|
|
1745
|
|
|
|
|
|
|
=back |
1746
|
|
|
|
|
|
|
|
1747
|
|
|
|
|
|
|
=over 4 |
1748
|
|
|
|
|
|
|
|
1749
|
|
|
|
|
|
|
=item lt example 6 |
1750
|
|
|
|
|
|
|
|
1751
|
|
|
|
|
|
|
package main; |
1752
|
|
|
|
|
|
|
|
1753
|
|
|
|
|
|
|
use Venus::Boolean; |
1754
|
|
|
|
|
|
|
use Venus::Number; |
1755
|
|
|
|
|
|
|
|
1756
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1757
|
|
|
|
|
|
|
my $rvalue = Venus::Number->new; |
1758
|
|
|
|
|
|
|
|
1759
|
|
|
|
|
|
|
my $result = $lvalue->lt($rvalue); |
1760
|
|
|
|
|
|
|
|
1761
|
|
|
|
|
|
|
# 0 |
1762
|
|
|
|
|
|
|
|
1763
|
|
|
|
|
|
|
=back |
1764
|
|
|
|
|
|
|
|
1765
|
|
|
|
|
|
|
=over 4 |
1766
|
|
|
|
|
|
|
|
1767
|
|
|
|
|
|
|
=item lt example 7 |
1768
|
|
|
|
|
|
|
|
1769
|
|
|
|
|
|
|
package main; |
1770
|
|
|
|
|
|
|
|
1771
|
|
|
|
|
|
|
use Venus::Boolean; |
1772
|
|
|
|
|
|
|
use Venus::Regexp; |
1773
|
|
|
|
|
|
|
|
1774
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1775
|
|
|
|
|
|
|
my $rvalue = Venus::Regexp->new; |
1776
|
|
|
|
|
|
|
|
1777
|
|
|
|
|
|
|
my $result = $lvalue->lt($rvalue); |
1778
|
|
|
|
|
|
|
|
1779
|
|
|
|
|
|
|
# 1 |
1780
|
|
|
|
|
|
|
|
1781
|
|
|
|
|
|
|
=back |
1782
|
|
|
|
|
|
|
|
1783
|
|
|
|
|
|
|
=over 4 |
1784
|
|
|
|
|
|
|
|
1785
|
|
|
|
|
|
|
=item lt example 8 |
1786
|
|
|
|
|
|
|
|
1787
|
|
|
|
|
|
|
package main; |
1788
|
|
|
|
|
|
|
|
1789
|
|
|
|
|
|
|
use Venus::Boolean; |
1790
|
|
|
|
|
|
|
use Venus::Scalar; |
1791
|
|
|
|
|
|
|
|
1792
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1793
|
|
|
|
|
|
|
my $rvalue = Venus::Scalar->new; |
1794
|
|
|
|
|
|
|
|
1795
|
|
|
|
|
|
|
my $result = $lvalue->lt($rvalue); |
1796
|
|
|
|
|
|
|
|
1797
|
|
|
|
|
|
|
# 1 |
1798
|
|
|
|
|
|
|
|
1799
|
|
|
|
|
|
|
=back |
1800
|
|
|
|
|
|
|
|
1801
|
|
|
|
|
|
|
=over 4 |
1802
|
|
|
|
|
|
|
|
1803
|
|
|
|
|
|
|
=item lt example 9 |
1804
|
|
|
|
|
|
|
|
1805
|
|
|
|
|
|
|
package main; |
1806
|
|
|
|
|
|
|
|
1807
|
|
|
|
|
|
|
use Venus::Boolean; |
1808
|
|
|
|
|
|
|
use Venus::String; |
1809
|
|
|
|
|
|
|
|
1810
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1811
|
|
|
|
|
|
|
my $rvalue = Venus::String->new; |
1812
|
|
|
|
|
|
|
|
1813
|
|
|
|
|
|
|
my $result = $lvalue->lt($rvalue); |
1814
|
|
|
|
|
|
|
|
1815
|
|
|
|
|
|
|
# 0 |
1816
|
|
|
|
|
|
|
|
1817
|
|
|
|
|
|
|
=back |
1818
|
|
|
|
|
|
|
|
1819
|
|
|
|
|
|
|
=over 4 |
1820
|
|
|
|
|
|
|
|
1821
|
|
|
|
|
|
|
=item lt example 10 |
1822
|
|
|
|
|
|
|
|
1823
|
|
|
|
|
|
|
package main; |
1824
|
|
|
|
|
|
|
|
1825
|
|
|
|
|
|
|
use Venus::Boolean; |
1826
|
|
|
|
|
|
|
use Venus::Undef; |
1827
|
|
|
|
|
|
|
|
1828
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1829
|
|
|
|
|
|
|
my $rvalue = Venus::Undef->new; |
1830
|
|
|
|
|
|
|
|
1831
|
|
|
|
|
|
|
my $result = $lvalue->lt($rvalue); |
1832
|
|
|
|
|
|
|
|
1833
|
|
|
|
|
|
|
# 0 |
1834
|
|
|
|
|
|
|
|
1835
|
|
|
|
|
|
|
=back |
1836
|
|
|
|
|
|
|
|
1837
|
|
|
|
|
|
|
=cut |
1838
|
|
|
|
|
|
|
|
1839
|
|
|
|
|
|
|
=head2 ne |
1840
|
|
|
|
|
|
|
|
1841
|
|
|
|
|
|
|
ne(any $arg) (boolean) |
1842
|
|
|
|
|
|
|
|
1843
|
|
|
|
|
|
|
The ne method performs a I<"not-equal-to"> operation using the argument provided. |
1844
|
|
|
|
|
|
|
|
1845
|
|
|
|
|
|
|
I> |
1846
|
|
|
|
|
|
|
|
1847
|
|
|
|
|
|
|
=over 4 |
1848
|
|
|
|
|
|
|
|
1849
|
|
|
|
|
|
|
=item ne example 1 |
1850
|
|
|
|
|
|
|
|
1851
|
|
|
|
|
|
|
package main; |
1852
|
|
|
|
|
|
|
|
1853
|
|
|
|
|
|
|
use Venus::Array; |
1854
|
|
|
|
|
|
|
use Venus::Boolean; |
1855
|
|
|
|
|
|
|
|
1856
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1857
|
|
|
|
|
|
|
my $rvalue = Venus::Array->new; |
1858
|
|
|
|
|
|
|
|
1859
|
|
|
|
|
|
|
my $result = $lvalue->ne($rvalue); |
1860
|
|
|
|
|
|
|
|
1861
|
|
|
|
|
|
|
# 1 |
1862
|
|
|
|
|
|
|
|
1863
|
|
|
|
|
|
|
=back |
1864
|
|
|
|
|
|
|
|
1865
|
|
|
|
|
|
|
=over 4 |
1866
|
|
|
|
|
|
|
|
1867
|
|
|
|
|
|
|
=item ne example 2 |
1868
|
|
|
|
|
|
|
|
1869
|
|
|
|
|
|
|
package main; |
1870
|
|
|
|
|
|
|
|
1871
|
|
|
|
|
|
|
use Venus::Boolean; |
1872
|
|
|
|
|
|
|
|
1873
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1874
|
|
|
|
|
|
|
my $rvalue = Venus::Boolean->new; |
1875
|
|
|
|
|
|
|
|
1876
|
|
|
|
|
|
|
my $result = $lvalue->ne($rvalue); |
1877
|
|
|
|
|
|
|
|
1878
|
|
|
|
|
|
|
# 0 |
1879
|
|
|
|
|
|
|
|
1880
|
|
|
|
|
|
|
=back |
1881
|
|
|
|
|
|
|
|
1882
|
|
|
|
|
|
|
=over 4 |
1883
|
|
|
|
|
|
|
|
1884
|
|
|
|
|
|
|
=item ne example 3 |
1885
|
|
|
|
|
|
|
|
1886
|
|
|
|
|
|
|
package main; |
1887
|
|
|
|
|
|
|
|
1888
|
|
|
|
|
|
|
use Venus::Code; |
1889
|
|
|
|
|
|
|
use Venus::Boolean; |
1890
|
|
|
|
|
|
|
|
1891
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1892
|
|
|
|
|
|
|
my $rvalue = Venus::Code->new; |
1893
|
|
|
|
|
|
|
|
1894
|
|
|
|
|
|
|
my $result = $lvalue->ne($rvalue); |
1895
|
|
|
|
|
|
|
|
1896
|
|
|
|
|
|
|
# 1 |
1897
|
|
|
|
|
|
|
|
1898
|
|
|
|
|
|
|
=back |
1899
|
|
|
|
|
|
|
|
1900
|
|
|
|
|
|
|
=over 4 |
1901
|
|
|
|
|
|
|
|
1902
|
|
|
|
|
|
|
=item ne example 4 |
1903
|
|
|
|
|
|
|
|
1904
|
|
|
|
|
|
|
package main; |
1905
|
|
|
|
|
|
|
|
1906
|
|
|
|
|
|
|
use Venus::Float; |
1907
|
|
|
|
|
|
|
use Venus::Boolean; |
1908
|
|
|
|
|
|
|
|
1909
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1910
|
|
|
|
|
|
|
my $rvalue = Venus::Float->new; |
1911
|
|
|
|
|
|
|
|
1912
|
|
|
|
|
|
|
my $result = $lvalue->ne($rvalue); |
1913
|
|
|
|
|
|
|
|
1914
|
|
|
|
|
|
|
# 0 |
1915
|
|
|
|
|
|
|
|
1916
|
|
|
|
|
|
|
=back |
1917
|
|
|
|
|
|
|
|
1918
|
|
|
|
|
|
|
=over 4 |
1919
|
|
|
|
|
|
|
|
1920
|
|
|
|
|
|
|
=item ne example 5 |
1921
|
|
|
|
|
|
|
|
1922
|
|
|
|
|
|
|
package main; |
1923
|
|
|
|
|
|
|
|
1924
|
|
|
|
|
|
|
use Venus::Hash; |
1925
|
|
|
|
|
|
|
use Venus::Boolean; |
1926
|
|
|
|
|
|
|
|
1927
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1928
|
|
|
|
|
|
|
my $rvalue = Venus::Hash->new; |
1929
|
|
|
|
|
|
|
|
1930
|
|
|
|
|
|
|
my $result = $lvalue->ne($rvalue); |
1931
|
|
|
|
|
|
|
|
1932
|
|
|
|
|
|
|
# 1 |
1933
|
|
|
|
|
|
|
|
1934
|
|
|
|
|
|
|
=back |
1935
|
|
|
|
|
|
|
|
1936
|
|
|
|
|
|
|
=over 4 |
1937
|
|
|
|
|
|
|
|
1938
|
|
|
|
|
|
|
=item ne example 6 |
1939
|
|
|
|
|
|
|
|
1940
|
|
|
|
|
|
|
package main; |
1941
|
|
|
|
|
|
|
|
1942
|
|
|
|
|
|
|
use Venus::Boolean; |
1943
|
|
|
|
|
|
|
use Venus::Number; |
1944
|
|
|
|
|
|
|
|
1945
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1946
|
|
|
|
|
|
|
my $rvalue = Venus::Number->new; |
1947
|
|
|
|
|
|
|
|
1948
|
|
|
|
|
|
|
my $result = $lvalue->ne($rvalue); |
1949
|
|
|
|
|
|
|
|
1950
|
|
|
|
|
|
|
# 0 |
1951
|
|
|
|
|
|
|
|
1952
|
|
|
|
|
|
|
=back |
1953
|
|
|
|
|
|
|
|
1954
|
|
|
|
|
|
|
=over 4 |
1955
|
|
|
|
|
|
|
|
1956
|
|
|
|
|
|
|
=item ne example 7 |
1957
|
|
|
|
|
|
|
|
1958
|
|
|
|
|
|
|
package main; |
1959
|
|
|
|
|
|
|
|
1960
|
|
|
|
|
|
|
use Venus::Boolean; |
1961
|
|
|
|
|
|
|
use Venus::Regexp; |
1962
|
|
|
|
|
|
|
|
1963
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1964
|
|
|
|
|
|
|
my $rvalue = Venus::Regexp->new; |
1965
|
|
|
|
|
|
|
|
1966
|
|
|
|
|
|
|
my $result = $lvalue->ne($rvalue); |
1967
|
|
|
|
|
|
|
|
1968
|
|
|
|
|
|
|
# 1 |
1969
|
|
|
|
|
|
|
|
1970
|
|
|
|
|
|
|
=back |
1971
|
|
|
|
|
|
|
|
1972
|
|
|
|
|
|
|
=over 4 |
1973
|
|
|
|
|
|
|
|
1974
|
|
|
|
|
|
|
=item ne example 8 |
1975
|
|
|
|
|
|
|
|
1976
|
|
|
|
|
|
|
package main; |
1977
|
|
|
|
|
|
|
|
1978
|
|
|
|
|
|
|
use Venus::Boolean; |
1979
|
|
|
|
|
|
|
use Venus::Scalar; |
1980
|
|
|
|
|
|
|
|
1981
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
1982
|
|
|
|
|
|
|
my $rvalue = Venus::Scalar->new; |
1983
|
|
|
|
|
|
|
|
1984
|
|
|
|
|
|
|
my $result = $lvalue->ne($rvalue); |
1985
|
|
|
|
|
|
|
|
1986
|
|
|
|
|
|
|
# 1 |
1987
|
|
|
|
|
|
|
|
1988
|
|
|
|
|
|
|
=back |
1989
|
|
|
|
|
|
|
|
1990
|
|
|
|
|
|
|
=over 4 |
1991
|
|
|
|
|
|
|
|
1992
|
|
|
|
|
|
|
=item ne example 9 |
1993
|
|
|
|
|
|
|
|
1994
|
|
|
|
|
|
|
package main; |
1995
|
|
|
|
|
|
|
|
1996
|
|
|
|
|
|
|
use Venus::Boolean; |
1997
|
|
|
|
|
|
|
use Venus::String; |
1998
|
|
|
|
|
|
|
|
1999
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2000
|
|
|
|
|
|
|
my $rvalue = Venus::String->new; |
2001
|
|
|
|
|
|
|
|
2002
|
|
|
|
|
|
|
my $result = $lvalue->ne($rvalue); |
2003
|
|
|
|
|
|
|
|
2004
|
|
|
|
|
|
|
# 0 |
2005
|
|
|
|
|
|
|
|
2006
|
|
|
|
|
|
|
=back |
2007
|
|
|
|
|
|
|
|
2008
|
|
|
|
|
|
|
=over 4 |
2009
|
|
|
|
|
|
|
|
2010
|
|
|
|
|
|
|
=item ne example 10 |
2011
|
|
|
|
|
|
|
|
2012
|
|
|
|
|
|
|
package main; |
2013
|
|
|
|
|
|
|
|
2014
|
|
|
|
|
|
|
use Venus::Boolean; |
2015
|
|
|
|
|
|
|
use Venus::Undef; |
2016
|
|
|
|
|
|
|
|
2017
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2018
|
|
|
|
|
|
|
my $rvalue = Venus::Undef->new; |
2019
|
|
|
|
|
|
|
|
2020
|
|
|
|
|
|
|
my $result = $lvalue->ne($rvalue); |
2021
|
|
|
|
|
|
|
|
2022
|
|
|
|
|
|
|
# 0 |
2023
|
|
|
|
|
|
|
|
2024
|
|
|
|
|
|
|
=back |
2025
|
|
|
|
|
|
|
|
2026
|
|
|
|
|
|
|
=cut |
2027
|
|
|
|
|
|
|
|
2028
|
|
|
|
|
|
|
=head2 negate |
2029
|
|
|
|
|
|
|
|
2030
|
|
|
|
|
|
|
negate() (boolean) |
2031
|
|
|
|
|
|
|
|
2032
|
|
|
|
|
|
|
The negate method returns C if the boolean is falsy, otherwise returns |
2033
|
|
|
|
|
|
|
C. |
2034
|
|
|
|
|
|
|
|
2035
|
|
|
|
|
|
|
I> |
2036
|
|
|
|
|
|
|
|
2037
|
|
|
|
|
|
|
=over 4 |
2038
|
|
|
|
|
|
|
|
2039
|
|
|
|
|
|
|
=item negate example 1 |
2040
|
|
|
|
|
|
|
|
2041
|
|
|
|
|
|
|
# given: synopsis; |
2042
|
|
|
|
|
|
|
|
2043
|
|
|
|
|
|
|
my $negate = $boolean->negate; |
2044
|
|
|
|
|
|
|
|
2045
|
|
|
|
|
|
|
# 1 |
2046
|
|
|
|
|
|
|
|
2047
|
|
|
|
|
|
|
=back |
2048
|
|
|
|
|
|
|
|
2049
|
|
|
|
|
|
|
=cut |
2050
|
|
|
|
|
|
|
|
2051
|
|
|
|
|
|
|
=head2 numified |
2052
|
|
|
|
|
|
|
|
2053
|
|
|
|
|
|
|
numified() (number) |
2054
|
|
|
|
|
|
|
|
2055
|
|
|
|
|
|
|
The numified method returns the numerical representation of the object. |
2056
|
|
|
|
|
|
|
|
2057
|
|
|
|
|
|
|
I> |
2058
|
|
|
|
|
|
|
|
2059
|
|
|
|
|
|
|
=over 4 |
2060
|
|
|
|
|
|
|
|
2061
|
|
|
|
|
|
|
=item numified example 1 |
2062
|
|
|
|
|
|
|
|
2063
|
|
|
|
|
|
|
# given: synopsis; |
2064
|
|
|
|
|
|
|
|
2065
|
|
|
|
|
|
|
my $numified = $boolean->numified; |
2066
|
|
|
|
|
|
|
|
2067
|
|
|
|
|
|
|
# 1 |
2068
|
|
|
|
|
|
|
|
2069
|
|
|
|
|
|
|
=back |
2070
|
|
|
|
|
|
|
|
2071
|
|
|
|
|
|
|
=over 4 |
2072
|
|
|
|
|
|
|
|
2073
|
|
|
|
|
|
|
=item numified example 2 |
2074
|
|
|
|
|
|
|
|
2075
|
|
|
|
|
|
|
package main; |
2076
|
|
|
|
|
|
|
|
2077
|
|
|
|
|
|
|
use Venus::Boolean; |
2078
|
|
|
|
|
|
|
|
2079
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new(0); |
2080
|
|
|
|
|
|
|
|
2081
|
|
|
|
|
|
|
my $numified = $boolean->numified; |
2082
|
|
|
|
|
|
|
|
2083
|
|
|
|
|
|
|
# 0 |
2084
|
|
|
|
|
|
|
|
2085
|
|
|
|
|
|
|
=back |
2086
|
|
|
|
|
|
|
|
2087
|
|
|
|
|
|
|
=over 4 |
2088
|
|
|
|
|
|
|
|
2089
|
|
|
|
|
|
|
=item numified example 3 |
2090
|
|
|
|
|
|
|
|
2091
|
|
|
|
|
|
|
package main; |
2092
|
|
|
|
|
|
|
|
2093
|
|
|
|
|
|
|
use Venus::Boolean; |
2094
|
|
|
|
|
|
|
|
2095
|
|
|
|
|
|
|
my $boolean = Venus::Boolean->new(1); |
2096
|
|
|
|
|
|
|
|
2097
|
|
|
|
|
|
|
my $numified = $boolean->numified; |
2098
|
|
|
|
|
|
|
|
2099
|
|
|
|
|
|
|
# 1 |
2100
|
|
|
|
|
|
|
|
2101
|
|
|
|
|
|
|
=back |
2102
|
|
|
|
|
|
|
|
2103
|
|
|
|
|
|
|
=cut |
2104
|
|
|
|
|
|
|
|
2105
|
|
|
|
|
|
|
=head2 string |
2106
|
|
|
|
|
|
|
|
2107
|
|
|
|
|
|
|
string() (string) |
2108
|
|
|
|
|
|
|
|
2109
|
|
|
|
|
|
|
The string method returns the word C<'true'> if the boolean is truthy, |
2110
|
|
|
|
|
|
|
otherwise returns C<'false'>. This method was formerly named I<"type">. |
2111
|
|
|
|
|
|
|
|
2112
|
|
|
|
|
|
|
I> |
2113
|
|
|
|
|
|
|
|
2114
|
|
|
|
|
|
|
=over 4 |
2115
|
|
|
|
|
|
|
|
2116
|
|
|
|
|
|
|
=item string example 1 |
2117
|
|
|
|
|
|
|
|
2118
|
|
|
|
|
|
|
# given: synopsis; |
2119
|
|
|
|
|
|
|
|
2120
|
|
|
|
|
|
|
my $string = $boolean->string; |
2121
|
|
|
|
|
|
|
|
2122
|
|
|
|
|
|
|
# "false" |
2123
|
|
|
|
|
|
|
|
2124
|
|
|
|
|
|
|
=back |
2125
|
|
|
|
|
|
|
|
2126
|
|
|
|
|
|
|
=cut |
2127
|
|
|
|
|
|
|
|
2128
|
|
|
|
|
|
|
=head2 tv |
2129
|
|
|
|
|
|
|
|
2130
|
|
|
|
|
|
|
tv(any $arg) (boolean) |
2131
|
|
|
|
|
|
|
|
2132
|
|
|
|
|
|
|
The tv method performs a I<"type-and-value-equal-to"> operation using argument |
2133
|
|
|
|
|
|
|
provided. |
2134
|
|
|
|
|
|
|
|
2135
|
|
|
|
|
|
|
I> |
2136
|
|
|
|
|
|
|
|
2137
|
|
|
|
|
|
|
=over 4 |
2138
|
|
|
|
|
|
|
|
2139
|
|
|
|
|
|
|
=item tv example 1 |
2140
|
|
|
|
|
|
|
|
2141
|
|
|
|
|
|
|
package main; |
2142
|
|
|
|
|
|
|
|
2143
|
|
|
|
|
|
|
use Venus::Array; |
2144
|
|
|
|
|
|
|
use Venus::Boolean; |
2145
|
|
|
|
|
|
|
|
2146
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2147
|
|
|
|
|
|
|
my $rvalue = Venus::Array->new; |
2148
|
|
|
|
|
|
|
|
2149
|
|
|
|
|
|
|
my $result = $lvalue->tv($rvalue); |
2150
|
|
|
|
|
|
|
|
2151
|
|
|
|
|
|
|
# 0 |
2152
|
|
|
|
|
|
|
|
2153
|
|
|
|
|
|
|
=back |
2154
|
|
|
|
|
|
|
|
2155
|
|
|
|
|
|
|
=over 4 |
2156
|
|
|
|
|
|
|
|
2157
|
|
|
|
|
|
|
=item tv example 2 |
2158
|
|
|
|
|
|
|
|
2159
|
|
|
|
|
|
|
package main; |
2160
|
|
|
|
|
|
|
|
2161
|
|
|
|
|
|
|
use Venus::Boolean; |
2162
|
|
|
|
|
|
|
|
2163
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2164
|
|
|
|
|
|
|
my $rvalue = Venus::Boolean->new; |
2165
|
|
|
|
|
|
|
|
2166
|
|
|
|
|
|
|
my $result = $lvalue->tv($rvalue); |
2167
|
|
|
|
|
|
|
|
2168
|
|
|
|
|
|
|
# 1 |
2169
|
|
|
|
|
|
|
|
2170
|
|
|
|
|
|
|
=back |
2171
|
|
|
|
|
|
|
|
2172
|
|
|
|
|
|
|
=over 4 |
2173
|
|
|
|
|
|
|
|
2174
|
|
|
|
|
|
|
=item tv example 3 |
2175
|
|
|
|
|
|
|
|
2176
|
|
|
|
|
|
|
package main; |
2177
|
|
|
|
|
|
|
|
2178
|
|
|
|
|
|
|
use Venus::Code; |
2179
|
|
|
|
|
|
|
use Venus::Boolean; |
2180
|
|
|
|
|
|
|
|
2181
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2182
|
|
|
|
|
|
|
my $rvalue = Venus::Code->new; |
2183
|
|
|
|
|
|
|
|
2184
|
|
|
|
|
|
|
my $result = $lvalue->tv($rvalue); |
2185
|
|
|
|
|
|
|
|
2186
|
|
|
|
|
|
|
# 0 |
2187
|
|
|
|
|
|
|
|
2188
|
|
|
|
|
|
|
=back |
2189
|
|
|
|
|
|
|
|
2190
|
|
|
|
|
|
|
=over 4 |
2191
|
|
|
|
|
|
|
|
2192
|
|
|
|
|
|
|
=item tv example 4 |
2193
|
|
|
|
|
|
|
|
2194
|
|
|
|
|
|
|
package main; |
2195
|
|
|
|
|
|
|
|
2196
|
|
|
|
|
|
|
use Venus::Float; |
2197
|
|
|
|
|
|
|
use Venus::Boolean; |
2198
|
|
|
|
|
|
|
|
2199
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2200
|
|
|
|
|
|
|
my $rvalue = Venus::Float->new; |
2201
|
|
|
|
|
|
|
|
2202
|
|
|
|
|
|
|
my $result = $lvalue->tv($rvalue); |
2203
|
|
|
|
|
|
|
|
2204
|
|
|
|
|
|
|
# 0 |
2205
|
|
|
|
|
|
|
|
2206
|
|
|
|
|
|
|
=back |
2207
|
|
|
|
|
|
|
|
2208
|
|
|
|
|
|
|
=over 4 |
2209
|
|
|
|
|
|
|
|
2210
|
|
|
|
|
|
|
=item tv example 5 |
2211
|
|
|
|
|
|
|
|
2212
|
|
|
|
|
|
|
package main; |
2213
|
|
|
|
|
|
|
|
2214
|
|
|
|
|
|
|
use Venus::Hash; |
2215
|
|
|
|
|
|
|
use Venus::Boolean; |
2216
|
|
|
|
|
|
|
|
2217
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2218
|
|
|
|
|
|
|
my $rvalue = Venus::Hash->new; |
2219
|
|
|
|
|
|
|
|
2220
|
|
|
|
|
|
|
my $result = $lvalue->tv($rvalue); |
2221
|
|
|
|
|
|
|
|
2222
|
|
|
|
|
|
|
# 0 |
2223
|
|
|
|
|
|
|
|
2224
|
|
|
|
|
|
|
=back |
2225
|
|
|
|
|
|
|
|
2226
|
|
|
|
|
|
|
=over 4 |
2227
|
|
|
|
|
|
|
|
2228
|
|
|
|
|
|
|
=item tv example 6 |
2229
|
|
|
|
|
|
|
|
2230
|
|
|
|
|
|
|
package main; |
2231
|
|
|
|
|
|
|
|
2232
|
|
|
|
|
|
|
use Venus::Boolean; |
2233
|
|
|
|
|
|
|
use Venus::Number; |
2234
|
|
|
|
|
|
|
|
2235
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2236
|
|
|
|
|
|
|
my $rvalue = Venus::Number->new; |
2237
|
|
|
|
|
|
|
|
2238
|
|
|
|
|
|
|
my $result = $lvalue->tv($rvalue); |
2239
|
|
|
|
|
|
|
|
2240
|
|
|
|
|
|
|
# 0 |
2241
|
|
|
|
|
|
|
|
2242
|
|
|
|
|
|
|
=back |
2243
|
|
|
|
|
|
|
|
2244
|
|
|
|
|
|
|
=over 4 |
2245
|
|
|
|
|
|
|
|
2246
|
|
|
|
|
|
|
=item tv example 7 |
2247
|
|
|
|
|
|
|
|
2248
|
|
|
|
|
|
|
package main; |
2249
|
|
|
|
|
|
|
|
2250
|
|
|
|
|
|
|
use Venus::Boolean; |
2251
|
|
|
|
|
|
|
use Venus::Regexp; |
2252
|
|
|
|
|
|
|
|
2253
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2254
|
|
|
|
|
|
|
my $rvalue = Venus::Regexp->new; |
2255
|
|
|
|
|
|
|
|
2256
|
|
|
|
|
|
|
my $result = $lvalue->tv($rvalue); |
2257
|
|
|
|
|
|
|
|
2258
|
|
|
|
|
|
|
# 0 |
2259
|
|
|
|
|
|
|
|
2260
|
|
|
|
|
|
|
=back |
2261
|
|
|
|
|
|
|
|
2262
|
|
|
|
|
|
|
=over 4 |
2263
|
|
|
|
|
|
|
|
2264
|
|
|
|
|
|
|
=item tv example 8 |
2265
|
|
|
|
|
|
|
|
2266
|
|
|
|
|
|
|
package main; |
2267
|
|
|
|
|
|
|
|
2268
|
|
|
|
|
|
|
use Venus::Boolean; |
2269
|
|
|
|
|
|
|
use Venus::Scalar; |
2270
|
|
|
|
|
|
|
|
2271
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2272
|
|
|
|
|
|
|
my $rvalue = Venus::Scalar->new; |
2273
|
|
|
|
|
|
|
|
2274
|
|
|
|
|
|
|
my $result = $lvalue->tv($rvalue); |
2275
|
|
|
|
|
|
|
|
2276
|
|
|
|
|
|
|
# 0 |
2277
|
|
|
|
|
|
|
|
2278
|
|
|
|
|
|
|
=back |
2279
|
|
|
|
|
|
|
|
2280
|
|
|
|
|
|
|
=over 4 |
2281
|
|
|
|
|
|
|
|
2282
|
|
|
|
|
|
|
=item tv example 9 |
2283
|
|
|
|
|
|
|
|
2284
|
|
|
|
|
|
|
package main; |
2285
|
|
|
|
|
|
|
|
2286
|
|
|
|
|
|
|
use Venus::Boolean; |
2287
|
|
|
|
|
|
|
use Venus::String; |
2288
|
|
|
|
|
|
|
|
2289
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2290
|
|
|
|
|
|
|
my $rvalue = Venus::String->new; |
2291
|
|
|
|
|
|
|
|
2292
|
|
|
|
|
|
|
my $result = $lvalue->tv($rvalue); |
2293
|
|
|
|
|
|
|
|
2294
|
|
|
|
|
|
|
# 0 |
2295
|
|
|
|
|
|
|
|
2296
|
|
|
|
|
|
|
=back |
2297
|
|
|
|
|
|
|
|
2298
|
|
|
|
|
|
|
=over 4 |
2299
|
|
|
|
|
|
|
|
2300
|
|
|
|
|
|
|
=item tv example 10 |
2301
|
|
|
|
|
|
|
|
2302
|
|
|
|
|
|
|
package main; |
2303
|
|
|
|
|
|
|
|
2304
|
|
|
|
|
|
|
use Venus::Boolean; |
2305
|
|
|
|
|
|
|
use Venus::Undef; |
2306
|
|
|
|
|
|
|
|
2307
|
|
|
|
|
|
|
my $lvalue = Venus::Boolean->new; |
2308
|
|
|
|
|
|
|
my $rvalue = Venus::Undef->new; |
2309
|
|
|
|
|
|
|
|
2310
|
|
|
|
|
|
|
my $result = $lvalue->tv($rvalue); |
2311
|
|
|
|
|
|
|
|
2312
|
|
|
|
|
|
|
# 0 |
2313
|
|
|
|
|
|
|
|
2314
|
|
|
|
|
|
|
=back |
2315
|
|
|
|
|
|
|
|
2316
|
|
|
|
|
|
|
=cut |
2317
|
|
|
|
|
|
|
|
2318
|
|
|
|
|
|
|
=head1 OPERATORS |
2319
|
|
|
|
|
|
|
|
2320
|
|
|
|
|
|
|
This package overloads the following operators: |
2321
|
|
|
|
|
|
|
|
2322
|
|
|
|
|
|
|
=cut |
2323
|
|
|
|
|
|
|
|
2324
|
|
|
|
|
|
|
=over 4 |
2325
|
|
|
|
|
|
|
|
2326
|
|
|
|
|
|
|
=item operation: C<(!)> |
2327
|
|
|
|
|
|
|
|
2328
|
|
|
|
|
|
|
This package overloads the C operator. |
2329
|
|
|
|
|
|
|
|
2330
|
|
|
|
|
|
|
B |
2331
|
|
|
|
|
|
|
|
2332
|
|
|
|
|
|
|
# given: synopsis; |
2333
|
|
|
|
|
|
|
|
2334
|
|
|
|
|
|
|
my $result = !$boolean; |
2335
|
|
|
|
|
|
|
|
2336
|
|
|
|
|
|
|
# 1 |
2337
|
|
|
|
|
|
|
|
2338
|
|
|
|
|
|
|
=back |
2339
|
|
|
|
|
|
|
|
2340
|
|
|
|
|
|
|
=over 4 |
2341
|
|
|
|
|
|
|
|
2342
|
|
|
|
|
|
|
=item operation: C<(!=)> |
2343
|
|
|
|
|
|
|
|
2344
|
|
|
|
|
|
|
This package overloads the C operator. |
2345
|
|
|
|
|
|
|
|
2346
|
|
|
|
|
|
|
B |
2347
|
|
|
|
|
|
|
|
2348
|
|
|
|
|
|
|
# given: synopsis; |
2349
|
|
|
|
|
|
|
|
2350
|
|
|
|
|
|
|
my $result = $boolean != 1; |
2351
|
|
|
|
|
|
|
|
2352
|
|
|
|
|
|
|
# 1 |
2353
|
|
|
|
|
|
|
|
2354
|
|
|
|
|
|
|
=back |
2355
|
|
|
|
|
|
|
|
2356
|
|
|
|
|
|
|
=over 4 |
2357
|
|
|
|
|
|
|
|
2358
|
|
|
|
|
|
|
=item operation: C<(==)> |
2359
|
|
|
|
|
|
|
|
2360
|
|
|
|
|
|
|
This package overloads the C<==> operator. |
2361
|
|
|
|
|
|
|
|
2362
|
|
|
|
|
|
|
B |
2363
|
|
|
|
|
|
|
|
2364
|
|
|
|
|
|
|
# given: synopsis; |
2365
|
|
|
|
|
|
|
|
2366
|
|
|
|
|
|
|
my $result = $boolean == 0; |
2367
|
|
|
|
|
|
|
|
2368
|
|
|
|
|
|
|
# 1 |
2369
|
|
|
|
|
|
|
|
2370
|
|
|
|
|
|
|
=back |
2371
|
|
|
|
|
|
|
|
2372
|
|
|
|
|
|
|
=over 4 |
2373
|
|
|
|
|
|
|
|
2374
|
|
|
|
|
|
|
=item operation: C<(E)> |
2375
|
|
|
|
|
|
|
|
2376
|
|
|
|
|
|
|
This package overloads the C> operator. |
2377
|
|
|
|
|
|
|
|
2378
|
|
|
|
|
|
|
B |
2379
|
|
|
|
|
|
|
|
2380
|
|
|
|
|
|
|
# given: synopsis; |
2381
|
|
|
|
|
|
|
|
2382
|
|
|
|
|
|
|
my $result = $boolean > 0; |
2383
|
|
|
|
|
|
|
|
2384
|
|
|
|
|
|
|
# 0 |
2385
|
|
|
|
|
|
|
|
2386
|
|
|
|
|
|
|
=back |
2387
|
|
|
|
|
|
|
|
2388
|
|
|
|
|
|
|
=over 4 |
2389
|
|
|
|
|
|
|
|
2390
|
|
|
|
|
|
|
=item operation: C<(E=)> |
2391
|
|
|
|
|
|
|
|
2392
|
|
|
|
|
|
|
This package overloads the C=> operator. |
2393
|
|
|
|
|
|
|
|
2394
|
|
|
|
|
|
|
B |
2395
|
|
|
|
|
|
|
|
2396
|
|
|
|
|
|
|
# given: synopsis; |
2397
|
|
|
|
|
|
|
|
2398
|
|
|
|
|
|
|
my $result = $boolean >= 0; |
2399
|
|
|
|
|
|
|
|
2400
|
|
|
|
|
|
|
# 1 |
2401
|
|
|
|
|
|
|
|
2402
|
|
|
|
|
|
|
=back |
2403
|
|
|
|
|
|
|
|
2404
|
|
|
|
|
|
|
=over 4 |
2405
|
|
|
|
|
|
|
|
2406
|
|
|
|
|
|
|
=item operation: C<(E)> |
2407
|
|
|
|
|
|
|
|
2408
|
|
|
|
|
|
|
This package overloads the C> operator. |
2409
|
|
|
|
|
|
|
|
2410
|
|
|
|
|
|
|
B |
2411
|
|
|
|
|
|
|
|
2412
|
|
|
|
|
|
|
# given: synopsis; |
2413
|
|
|
|
|
|
|
|
2414
|
|
|
|
|
|
|
my $result = $boolean < 1; |
2415
|
|
|
|
|
|
|
|
2416
|
|
|
|
|
|
|
# 1 |
2417
|
|
|
|
|
|
|
|
2418
|
|
|
|
|
|
|
=back |
2419
|
|
|
|
|
|
|
|
2420
|
|
|
|
|
|
|
=over 4 |
2421
|
|
|
|
|
|
|
|
2422
|
|
|
|
|
|
|
=item operation: C<(E=)> |
2423
|
|
|
|
|
|
|
|
2424
|
|
|
|
|
|
|
This package overloads the C=> operator. |
2425
|
|
|
|
|
|
|
|
2426
|
|
|
|
|
|
|
B |
2427
|
|
|
|
|
|
|
|
2428
|
|
|
|
|
|
|
# given: synopsis; |
2429
|
|
|
|
|
|
|
|
2430
|
|
|
|
|
|
|
my $result = $boolean <= 0; |
2431
|
|
|
|
|
|
|
|
2432
|
|
|
|
|
|
|
# 1 |
2433
|
|
|
|
|
|
|
|
2434
|
|
|
|
|
|
|
=back |
2435
|
|
|
|
|
|
|
|
2436
|
|
|
|
|
|
|
=over 4 |
2437
|
|
|
|
|
|
|
|
2438
|
|
|
|
|
|
|
=item operation: C<(bool)> |
2439
|
|
|
|
|
|
|
|
2440
|
|
|
|
|
|
|
This package overloads the C operator. |
2441
|
|
|
|
|
|
|
|
2442
|
|
|
|
|
|
|
B |
2443
|
|
|
|
|
|
|
|
2444
|
|
|
|
|
|
|
# given: synopsis; |
2445
|
|
|
|
|
|
|
|
2446
|
|
|
|
|
|
|
my $result = !!$boolean; |
2447
|
|
|
|
|
|
|
|
2448
|
|
|
|
|
|
|
# 0 |
2449
|
|
|
|
|
|
|
|
2450
|
|
|
|
|
|
|
=back |
2451
|
|
|
|
|
|
|
|
2452
|
|
|
|
|
|
|
=over 4 |
2453
|
|
|
|
|
|
|
|
2454
|
|
|
|
|
|
|
=item operation: C<(eq)> |
2455
|
|
|
|
|
|
|
|
2456
|
|
|
|
|
|
|
This package overloads the C operator. |
2457
|
|
|
|
|
|
|
|
2458
|
|
|
|
|
|
|
B |
2459
|
|
|
|
|
|
|
|
2460
|
|
|
|
|
|
|
# given: synopsis; |
2461
|
|
|
|
|
|
|
|
2462
|
|
|
|
|
|
|
my $result = $boolean eq '0'; |
2463
|
|
|
|
|
|
|
|
2464
|
|
|
|
|
|
|
# 1 |
2465
|
|
|
|
|
|
|
|
2466
|
|
|
|
|
|
|
=back |
2467
|
|
|
|
|
|
|
|
2468
|
|
|
|
|
|
|
=over 4 |
2469
|
|
|
|
|
|
|
|
2470
|
|
|
|
|
|
|
=item operation: C<(ne)> |
2471
|
|
|
|
|
|
|
|
2472
|
|
|
|
|
|
|
This package overloads the C operator. |
2473
|
|
|
|
|
|
|
|
2474
|
|
|
|
|
|
|
B |
2475
|
|
|
|
|
|
|
|
2476
|
|
|
|
|
|
|
# given: synopsis; |
2477
|
|
|
|
|
|
|
|
2478
|
|
|
|
|
|
|
my $result = $boolean ne '1'; |
2479
|
|
|
|
|
|
|
|
2480
|
|
|
|
|
|
|
# 1 |
2481
|
|
|
|
|
|
|
|
2482
|
|
|
|
|
|
|
=back |
2483
|
|
|
|
|
|
|
|
2484
|
|
|
|
|
|
|
=over 4 |
2485
|
|
|
|
|
|
|
|
2486
|
|
|
|
|
|
|
=item operation: C<(qr)> |
2487
|
|
|
|
|
|
|
|
2488
|
|
|
|
|
|
|
This package overloads the C operator. |
2489
|
|
|
|
|
|
|
|
2490
|
|
|
|
|
|
|
B |
2491
|
|
|
|
|
|
|
|
2492
|
|
|
|
|
|
|
# given: synopsis; |
2493
|
|
|
|
|
|
|
|
2494
|
|
|
|
|
|
|
my $result = '0' =~ qr/$boolean/; |
2495
|
|
|
|
|
|
|
|
2496
|
|
|
|
|
|
|
# 1 |
2497
|
|
|
|
|
|
|
|
2498
|
|
|
|
|
|
|
=back |
2499
|
|
|
|
|
|
|
|
2500
|
|
|
|
|
|
|
=head1 AUTHORS |
2501
|
|
|
|
|
|
|
|
2502
|
|
|
|
|
|
|
Awncorp, C |
2503
|
|
|
|
|
|
|
|
2504
|
|
|
|
|
|
|
=cut |
2505
|
|
|
|
|
|
|
|
2506
|
|
|
|
|
|
|
=head1 LICENSE |
2507
|
|
|
|
|
|
|
|
2508
|
|
|
|
|
|
|
Copyright (C) 2000, Awncorp, C. |
2509
|
|
|
|
|
|
|
|
2510
|
|
|
|
|
|
|
This program is free software, you can redistribute it and/or modify it under |
2511
|
|
|
|
|
|
|
the terms of the Apache license version 2.0. |
2512
|
|
|
|
|
|
|
|
2513
|
|
|
|
|
|
|
=cut |