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