Build all packages removed dependencies of libtest-exception-perl libtest-warn-perl...
[dh-make-perl] / dev / i386 / libperl-critic-perl / libperl-critic-perl-1.088 / t / ValuesAndExpressions / ProhibitMagicNumbers.run
1 ## name Version numbers allowed in use statements.
2 ## failures 0
3 ## cut
4
5 use 5.8.1;
6
7 ## name Version numbers allowed in require statements.
8 ## failures 0
9 ## cut
10
11 require 5.8.1;
12
13 ## name Version numbers not allowed in regular statements.
14 ## failures 1
15 ## cut
16
17 $Aleax = 5.8.1;
18
19 ## name All numbers are allowed on any use statement.
20 ## failures 0
21 ## cut
22
23 use Test::More plan => 57;
24
25 ## name Numbers allowed on plan statements.
26 ## failures 0
27 ## cut
28
29 plan tests => 2349;
30
31 ## name Decimal zero is allowed anywhere.
32 ## failures 0
33 ## cut
34
35 $tangle_tree = 0;
36
37 ## name Floating-point zero is allowed anywhere.
38 ## failures 0
39 ## cut
40
41 $xiron_golem = 0.0
42
43 ## name Decimal one is allowed anywhere.
44 ## failures 0
45 ## cut
46
47 $killer_tomato = 1;
48
49 ## name Floating-point one is allowed anywhere.
50 ## failures 0
51 ## cut
52
53 $witch_doctor = 1.0;
54
55 ## name Decimal two is allowed anywhere.
56 ## failures 0
57 ## cut
58
59 $gold_golem = 2;
60
61 ## name Floating-point two is allowed anywhere.
62 ## failures 0
63 ## cut
64
65 $lich = 2.0;
66
67 ## name Fractional numbers not allowed in regular statements.
68 ## failures 1
69 ## cut
70
71 $soldier = 2.5;
72
73 ## name Negative one is not allowed by default.
74 ## failures 1
75 ## cut
76
77 $giant_pigmy = -1;
78
79 ## name The answer to life, the universe, and everything is not allowed in regular statements.
80 ## failures 1
81 ## cut
82
83 $frobnication_factor = 42;
84
85 ## name The answer to life, the universe, and everything is allowed as a constant.
86 ## failures 0
87 ## cut
88
89 use constant FROBNICATION_FACTOR => 42;
90
91 ## name Fractional numbers are allowed as a constant.
92 ## failures 0
93 ## cut
94
95 use constant FROBNICATION_FACTOR => 1_234.567_89;
96
97 ## name The Readonly subroutine works.
98 ## failures 0
99 ## cut
100
101 use Readonly;
102
103 Readonly $frobnication_factor => 57;
104
105 ## name The Readonly::Scalar subroutine works.
106 ## failures 0
107 ## cut
108
109 use Readonly;
110
111 Readonly::Scalar $frobnication_factor => 57;
112
113 ## name The Readonly::Scalar1 subroutine does not work.
114 ## failures 1
115 ## cut
116
117 use Readonly;
118
119 Readonly::Scalar1 $frobnication_factor => 57;
120
121 ## name The Readonly::Array subroutine works.
122 ## failures 0
123 ## cut
124
125 use Readonly;
126
127 Readonly::Array @frobnication_factors => ( 57, 193, 49675 );
128
129 ## name The Readonly::Array1 subroutine does not work.
130 ## failures 3
131 ## cut
132
133 use Readonly;
134
135 Readonly::Array1 @frobnication_factors => ( 57, 193, 49675 );
136
137 ## name The Readonly::Hash subroutine works.
138 ## failures 0
139 ## cut
140
141 use Readonly;
142
143 Readonly::Hash %frobnication_factors => ( 57 => 290 );
144
145 ## name The Readonly::Hash1 subroutine does not work.
146 ## failures 2
147 ## cut
148
149 use Readonly;
150
151 Readonly::Hash1 %frobnication_factors => ( 57 => 290 );
152
153 ## name Constant subroutines containing just a number are allowed.
154 ## failures 0
155 ## cut
156
157 sub constant_subroutine { 104598 }
158
159 ## name Constant subroutines containing "return" and a number are allowed.
160 ## failures 0
161 ## cut
162
163 sub constant_subroutine { return 9068; }
164
165 ## name Subroutines that contain something other than a constant return value are not allowed.
166 ## failures 1
167 ## cut
168
169 sub constant_subroutine {
170     print 'blah';
171     return 9068;
172 }
173
174 ## name Magic numbers not allowed in ranges.
175 ## failures 1
176 ## cut
177
178 foreach my $solid (1..5) {
179     frobnicate($solid);
180 }
181
182 ## name Readonly numbers allowed in ranges.
183 ## failures 0
184 ## cut
185
186 use Readonly;
187
188 Readonly my $REGULAR_GEOMETRIC_SOLIDS => 5;
189
190 foreach my $solid (1..$REGULAR_GEOMETRIC_SOLIDS) {
191     frobnicate($solid);
192 }
193
194 ## name Binary zero isn't allowed in regular statements.
195 ## failures 1
196 ## cut
197
198 $battlemech = 0b0;
199
200 ## name Readonly binary zero is allowed.
201 ## failures 0
202 ## cut
203
204 Readonly $giant_eel => 0b0;
205
206 ## name Binary one isn't allowed in regular statements.
207 ## failures 1
208 ## cut
209
210 $xeroc = 0b1;
211
212 ## name Readonly binary one is allowed.
213 ## failures 0
214 ## cut
215
216 Readonly $creeping_coins => 0b1;
217
218 ## name Octal zero isn't allowed in regular statements.
219 ## failures 1
220 ## cut
221
222 $basilisk = 000;
223
224 ## name Readonly octal zero is allowed.
225 ## failures 0
226 ## cut
227
228 Readonly $dwarf_lord => 000;
229
230 ## name Octal one isn't allowed in regular statements.
231 ## failures 1
232 ## cut
233
234 $brown_mold = 001;
235
236 ## name Readonly octal one is allowed.
237 ## failures 0
238 ## cut
239
240 Readonly $kobold_zombie => 001;
241
242 ## name Hexadecimal zero isn't allowed in regular statements.
243 ## failures 1
244 ## cut
245
246 $yeti = 0x00;
247
248 ## name Readonly hexadecimal zero is allowed.
249 ## failures 0
250 ## cut
251
252 Readonly $newt => 0x00;
253
254 ## name Hexadecimal one isn't allowed in regular statements.
255 ## failures 1
256 ## cut
257
258 $piranha = 0x01;
259
260 ## name Readonly hexadecimal one is allowed.
261 ## failures 0
262 ## cut
263
264 Readonly $Lord_Surtur => 0x01;
265
266 ## name Exponential zero isn't allowed in regular statements.
267 ## failures 1
268 ## cut
269
270 $Green_elf = 0e0;
271
272 ## name Readonly exponential zero is allowed.
273 ## failures 0
274 ## cut
275
276 Readonly $sasquatch => 0e0;
277
278 ## name Exponential one isn't allowed in regular statements.
279 ## failures 1
280 ## cut
281
282 $Uruk_hai = 1e0;
283
284 ## name Readonly exponential one is allowed.
285 ## failures 0
286 ## cut
287
288 Readonly $leather_golem => 1e0;
289
290 ## name Any numbers allowed in array references in use statement.
291 ## failures 0
292 ## cut
293
294 use Some::Module [ 1, 2, 3, 4 ];
295
296 ## name Any numbers allowed in array references in require statement.
297 ## failures 0
298 ## cut
299
300 require Some::Other::Module [ 1, 2, 3, 4 ];
301
302 ## name Any numbers allowed in array references in readonly statement.
303 ## failures 0
304 ## cut
305
306 Readonly $Totoro => [ 1, 2, 3, 4 ];
307
308 ## name Magic numbers not allowed in array references in regular statement.
309 ## failures 2
310 ## cut
311
312 $Evil_Iggy = [ 1, 2, 3, 4 ];
313
314 ## name Array references containing only good numbers are allowed (by this policy).
315 ## failures 0
316 ## cut
317
318 $titanothere = [ 1, 0, 1, 0 ];
319
320 ## name Any numbers allowed in hash references in use statement.
321 ## failures 0
322 ## cut
323
324 use Some::Module { 1 => 2, 3 => 4 };
325
326 ## name Any numbers allowed in hash references in require statement.
327 ## failures 0
328 ## cut
329
330 require Some::Other::Module { 1 => 2, 3 => 4 };
331
332 ## name Any numbers allowed in hash references in readonly statement.
333 ## failures 0
334 ## cut
335
336 Readonly $Vlad_the_Impaler => { 1 => 2, 3 => 4 };
337
338 ## name Magic numbers not allowed in hash references in regular statement.
339 ## failures 2
340 ## cut
341
342 $gnome_lord = { 1 => 2, 3 => 4 };
343
344 ## name Hash references containing only good numbers are allowed (by this policy).
345 ## failures 0
346 ## cut
347
348 $aardvark = { 1 => 0, 0 => 1 };
349
350 ## name Any numbers allowed in lists in use statement.
351 ## failures 0
352 ## cut
353
354 use Some::Module ( 1, 2, 3, 4 );
355
356 ## name Any numbers allowed in lists in require statement.
357 ## failures 0
358 ## cut
359
360 require Some::Other::Module ( 1, 2, 3, 4 );
361
362 ## name Any numbers allowed in lists in readonly statement.
363 ## failures 0
364 ## cut
365
366 Readonly @elf_mummy => ( 1, 2, 3, 4 );
367
368 ## name Magic numbers not allowed in lists in regular statement.
369 ## failures 2
370 ## cut
371
372 @kitten = ( 1, 2, 3, 4 );
373
374 ## name Lists containing only good numbers are allowed (by this policy).
375 ## failures 0
376 ## cut
377
378 @purple_worm = ( 1, 0, 1, 0 );
379
380 ## name Magic numbers not allowed in nested lists in regular statement.
381 ## failures 2
382 ## cut
383
384 @quivering_blob = ( 1, ( 2, 3, 4 ) );
385
386 ## name Magic numbers not allowed in nested array references in regular statement.
387 ## failures 2
388 ## cut
389
390 @green_slime = ( 1, [ 2, 3, 4 ] );
391
392 ## name Magic numbers not allowed in nested hash references in regular statement.
393 ## failures 1
394 ## cut
395
396 @fire_elemental = ( 1, { 2 => 4 } );
397
398 ## name Good numbers allowed in nested hash references anywhere.
399 ## failures 0
400 ## cut
401
402 @Y2K_bug = ( 1, { 0 => 1 } );
403
404 ## name Magic numbers not allowed in deep data structures in regular statement.
405 ## failures 1
406 ## cut
407
408 @fog_cloud = [ 1, { 0 => { 1 => [ 1, 1, [ \382 ] ] } } ];
409
410 ## name Good numbers allowed in deep datastructures anywhere.
411 ## failures 0
412 ## cut
413
414 @fog_cloud = [ 1, { 0 => { 1 => [ 1, 1, [ 1 ] ] } } ];
415
416 ## name $VERSION variables get a special exemption.
417 ## failures 0
418 ## cut
419
420 our $VERSION = 0.21;
421
422 ## name Last element of an array gets a special exemption.
423 ## failures 0
424 ## cut
425
426 $Invid = $nalfeshnee[-1];
427
428 ## name Last element exemption does not work if there is anything else within the subscript.
429 ## failures 1
430 ## cut
431
432 $warhorse = $Cerberus[-1 * 1];
433
434 ## name Penultimate element of an array does not get a special exemption.
435 ## failures 1
436 ## cut
437
438 $scorpion = $shadow[-2];
439
440 ## name Decimal zero is allowed even if the configuration specifies that there aren't any allowed literals.
441 ## failures 0
442 ## parms { allowed_values => '' }
443 ## cut
444
445 $tangle_tree = 0;
446
447 ## name Floating-point zero is allowed even if the configuration specifies that there aren't any allowed literals.
448 ## failures 0
449 ## parms { allowed_values => '' }
450 ## cut
451
452 $xiron_golem = 0.0
453
454 ## name Decimal one is allowed even if the configuration specifies that there aren't any allowed literals.
455 ## failures 0
456 ## parms { allowed_values => '' }
457 ## cut
458
459 $killer_tomato = 1;
460
461 ## name Floating-point one is allowed even if the configuration specifies that there aren't any allowed literals.
462 ## failures 0
463 ## parms { allowed_values => '' }
464 ## cut
465
466 $witch_doctor = 1.0;
467
468 ## name Decimal two is not allowed if the configuration specifies that there aren't any allowed literals.
469 ## failures 1
470 ## parms { allowed_values => '' }
471 ## cut
472
473 $gold_golem = 2;
474
475 ## name Floating-point two is not allowed if the configuration specifies that there aren't any allowed literals.
476 ## failures 1
477 ## parms { allowed_values => '' }
478 ## cut
479
480 $lich = 2.0;
481
482 ## name Decimal zero is allowed even if the configuration doesn't include it in the allowed literals.
483 ## failures 0
484 ## parms { allowed_values => '3 -5' }
485 ## cut
486
487 $tangle_tree = 0;
488
489 ## name Floating-point zero is allowed even if the configuration doesn't include it in the allowed literals.
490 ## failures 0
491 ## parms { allowed_values => '3 -5' }
492 ## cut
493
494 $xiron_golem = 0.0
495
496 ## name Decimal one is allowed even if the configuration doesn't include it in the allowed literals.
497 ## failures 0
498 ## parms { allowed_values => '3 -5' }
499 ## cut
500
501 $killer_tomato = 1;
502
503 ## name Floating-point one is allowed even if the configuration doesn't include it in the allowed literals.
504 ## failures 0
505 ## parms { allowed_values => '3 -5' }
506 ## cut
507
508 $witch_doctor = 1.0;
509
510 ## name Decimal two is not allowed if the configuration doesn't include it in the allowed literals.
511 ## failures 1
512 ## parms { allowed_values => '3 -5' }
513 ## cut
514
515 $gold_golem = 2;
516
517 ## name Floating-point two is not allowed if the configuration doesn't include it in the allowed literals.
518 ## failures 1
519 ## parms { allowed_values => '3 -5' }
520 ## cut
521
522 $lich = 2.0;
523
524 ## name Decimal three is allowed if the configuration includes it in the allowed literals.
525 ## failures 0
526 ## parms { allowed_values => '3 -5' }
527 ## cut
528
529 $ghoul = 3;
530
531 ## name Floating-point three is allowed if the configuration includes it in the allowed literals.
532 ## failures 0
533 ## parms { allowed_values => '3 -5' }
534 ## cut
535
536 $water_elemental = 3.0;
537
538 ## name Decimal negative five is allowed if the configuration includes it in the allowed literals.
539 ## failures 0
540 ## parms { allowed_values => '3 -5' }
541 ## cut
542
543 $glass_piercer = -5;
544
545 ## name Floating-point negative five is allowed if the configuration includes it in the allowed literals.
546 ## failures 0
547 ## parms { allowed_values => '3 -5' }
548 ## cut
549
550 $clay_golem = -5.0;
551
552 ## name Decimal zero is allowed even if the configuration specifies that there aren't any allowed types.
553 ## failures 0
554 ## parms { allowed_types => '' }
555 ## cut
556
557 $tangle_tree = 0;
558
559 ## name Floating-point zero is not allowed if the configuration specifies that there aren't any allowed types.
560 ## failures 1
561 ## parms { allowed_types => '' }
562 ## cut
563
564 $xiron_golem = 0.0
565
566 ## name Decimal one is allowed even if the configuration specifies that there aren't any allowed types.
567 ## failures 0
568 ## parms { allowed_types => '' }
569 ## cut
570
571 $killer_tomato = 1;
572
573 ## name Floating-point one is not allowed if the configuration specifies that there aren't any allowed types.
574 ## failures 1
575 ## parms { allowed_types => '' }
576 ## cut
577
578 $witch_doctor = 1.0;
579
580 ## name Decimal zero is allowed if the configuration specifies that there are any allowed types.
581 ## failures 0
582 ## parms { allowed_types => 'Float' }
583 ## cut
584
585 $tangle_tree = 0;
586
587 ## name Floating-point zero is allowed if the configuration specifies that the Float type is allowed.
588 ## failures 0
589 ## parms { allowed_types => 'Float' }
590 ## cut
591
592 $xiron_golem = 0.0
593
594 ## name Decimal one is allowed if the configuration specifies that there are any allowed types.
595 ## failures 0
596 ## parms { allowed_types => 'Float' }
597 ## cut
598
599 $killer_tomato = 1;
600
601 ## name Floating-point one is allowed if the configuration specifies that the Float type is allowed.
602 ## failures 0
603 ## parms { allowed_types => 'Float' }
604 ## cut
605
606 $witch_doctor = 1.0;
607
608 ## name Binary zero is allowed if the configuration specifies that the Binary type is allowed.
609 ## failures 0
610 ## parms { allowed_types => 'Binary' }
611 ## cut
612
613 $battlemech = 0b0;
614
615 ## name Binary one is allowed if the configuration specifies that the Binary type is allowed.
616 ## failures 0
617 ## parms { allowed_types => 'Binary' }
618 ## cut
619
620 $xeroc = 0b1;
621
622 ## name Exponential zero is allowed if the configuration specifies that the Exp type is allowed.
623 ## failures 0
624 ## parms { allowed_types => 'Exp' }
625 ## cut
626
627 $Green_elf = 0e0;
628
629 ## name Exponential one is allowed if the configuration specifies that the Exp type is allowed.
630 ## failures 0
631 ## parms { allowed_types => 'Exp' }
632 ## cut
633
634 $Uruk_hai = 1e0;
635
636 ## name Hexadecimal zero is allowed if the configuration specifies that the Hex type is allowed.
637 ## failures 0
638 ## parms { allowed_types => 'Hex' }
639 ## cut
640
641 $yeti = 0x00;
642
643 ## name Hexadecimal one is allowed if the configuration specifies that the Hex type is allowed.
644 ## failures 0
645 ## parms { allowed_types => 'Hex' }
646 ## cut
647
648 $piranha = 0x01;
649
650 ## name Octal zero is allowed if the configuration specifies that the Octal type is allowed.
651 ## failures 0
652 ## parms { allowed_types => 'Octal' }
653 ## cut
654
655 $basilisk = 000;
656
657 ## name Octal one is allowed if the configuration specifies that the Octal type is allowed.
658 ## failures 0
659 ## parms { allowed_types => 'Octal' }
660 ## cut
661
662 $brown_mold = 001;
663
664 ## name Any integer value should pass if the allowed values contains 'all_integers'.
665 ## failures 0
666 ## parms { allowed_values => 'all_integers' }
667 ## cut
668
669 $brogmoid = 356_634_627;
670 $rat_ant  =     -29_422;
671
672 ## name Any floating-point value without a fractional portion should pass if the allowed values contains 'all_integers'.
673 ## failures 0
674 ## parms { allowed_values => 'all_integers' }
675 ## cut
676
677 $human = 102_938.0;
678
679 ## name A non-integral value should pass if the allowed values contains it and 'all_integers'.
680 ## failures 0
681 ## parms { allowed_values => 'all_integers 429.73902' }
682 ## cut
683
684 $Norn = 429.73902;
685
686 ## name Any binary value should pass if the allowed values contains 'all_integers' and allowed types includes 'Binary'.
687 ## failures 0
688 ## parms { allowed_values => 'all_integers', allowed_types => 'Binary' }
689 ## cut
690
691 $baby_blue_dragon = 0b01100101_01101010_01110011;
692
693 ## name Any hexadecimal value should pass if the allowed values contains 'all_integers' and allowed types includes 'Hex'.
694 ## failures 0
695 ## parms { allowed_values => 'all_integers', allowed_types => 'Hex' }
696 ## cut
697
698 $killer_bee = 0x656a73;
699
700 ## name Any octal value should pass if the allowed values contains 'all_integers' and allowed types includes 'Octal'.
701 ## failures 0
702 ## parms { allowed_values => 'all_integers', allowed_types => 'Octal' }
703 ## cut
704
705 $ettin_mummy = 0145_152_163;
706
707 ## name Zero, one, three, four, and five decimal values should pass if the allowed values contains the '3..5' range.
708 ## failures 0
709 ## parms { allowed_values => '3..5' }
710 ## cut
711
712 $guide = 0;
713 $cuatl = 1;
714 $Master_Assassin = 3;
715 $orc = 4;
716 $trapper = 5;
717
718 ## name Negative one, two, and six decimal values and fractional values should not pass if the allowed values contains the '3..5' range.
719 ## failures 4
720 ## parms { allowed_values => '3..5' }
721 ## cut
722
723 $Elvenking = -1;
724 $brown_pudding = 2;
725 $archeologist = 6;
726 $nurse = 4.5;
727
728 ## name -3/2, -2/2, -1/2 ... 7/5 should pass if the allowed values contains the '-1.5..3.5:by(0.5)' range.
729 ## failures 0
730 ## parms { allowed_values => '-1.5..3.5:by(0.5)' }
731 ## cut
732
733 $owlbear = [ -1.5, -1, -.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5 ];
734
735 ## name Negative two and four should not pass if the allowed values contains the '-1.5..3.5:by(0.5)' range.
736 ## failures 2
737 ## parms { allowed_values => '-1.5..3.5:by(0.5)' }
738 ## cut
739
740 $lurker_above = [ -2, 4 ];
741
742 ## name -3/2, -1/2, 1/2 ... 7/5, plus 0 and 1 should pass if the allowed values contains the '-1.5..3.5' range.
743 ## failures 0
744 ## parms { allowed_values => '-1.5..3.5' }
745 ## cut
746
747 $long_worm = [ -1.5, -.5, 0, 0.5, 1, 1.5, 2.5, 3.5 ];
748
749 ## name -3/2, -2/2, -1/2 ... 7/5 should pass if the allowed values contains the '-1.5..3.5' range and 'all_integers'.
750 ## failures 0
751 ## parms { allowed_values => 'all_integers -1.5..3.5' }
752 ## cut
753
754 $ice_devil = [ -1.5, -1, -.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5 ];
755
756 ## name -5, -4, -3, -2, 0, 1, 21, 22, 23, and 24 should pass if the allowed values contains the '-5..-2' and '21..24 ranges.
757 ## failures 0
758 ## parms { allowed_values => '-5..-2 21..24' }
759 ## cut
760
761 $newt = [ -5, -4, -3, -2, 0, 1, 21, 22, 23, 24 ];
762
763 ## name Should pass mini-CPAN accumulated \$VERSION declarations.
764 ## failures 0
765 ## cut
766
767 (our $VERSION = q$Revision: 2293 $) =~ s/Revision //;
768 (our $VERSION) = '$Revision: 2293 $' =~ /([\d.]+)/;
769 (our $VERSION) = sprintf "%d", q$Revision: 2293 $ =~ /Revision:\s+(\S+)/;
770 our $VERSION : unique = "1.23";
771 our $VERSION : unique = '1.23';
772 our $VERSION = "$local_variable v1.23";
773 our $VERSION = "1." . sprintf "%d", q$Revision: 2293 $ =~ /: (\d+)/;
774 our $VERSION = "1.2.3";
775 our $VERSION = "1.2.3.0";
776 our $VERSION = "1.2.3.blah";
777 our $VERSION = "1.23 (liblgrp version $local_variable)";
778 our $VERSION = "1.23 2005-05-20";
779 our $VERSION = "1.23";
780 our $VERSION = "1.23, 2004-12-07";
781 our $VERSION = "1.23_blah";
782 our $VERSION = "1.23blah";
783 our $VERSION = "1.2_3";
784 our $VERSION = "123";
785 our $VERSION = "INSERT";
786 our $VERSION = $SomeOtherModule::VERSION;
787 our $VERSION = $VERSION = (qw($Revision: 2293 $))[1];
788 our $VERSION = $local_variable;
789 our $VERSION = '$Date: 2008-05-04 12:18:31 -0500 (Sun, 04 May 2008) $'; $VERSION =~ s|^\$Date:\s*([0-9]{4})/([0-9]{2})/([0-9]{2})\s.*|\1.\2.\3| ;
790 our $VERSION = '$Revision: 2293 $' =~ /\$Revision:\s+([^\s]+)/;
791 our $VERSION = '$Revision: 2293 $';
792 our $VERSION = '-123 blah';
793 our $VERSION = '1.' . qw $Revision: 2293 $[1];
794 our $VERSION = '1.' . sprintf "%d", (qw($Revision: 2293 $))[1];
795 our $VERSION = '1.' . sprintf("%d", (qw($Revision: 2293 $))[1]);
796 our $VERSION = '1.2.3';
797 our $VERSION = '1.2.3.0';
798 our $VERSION = '1.2.3blah';
799 our $VERSION = '1.23';
800 our $VERSION = '1.23_blah';
801 our $VERSION = '1.23blah';
802 our $VERSION = '1.2_3';
803 our $VERSION = '1.23' || do { q $Revision: 2293 $ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 };
804 our $VERSION = '123';
805 our $VERSION = ('$Revision: 2293 $' =~ /(\d+.\d+)/)[ 0];
806 our $VERSION = ('$Revision: 2293 $' =~ /(\d+\.\d+)/);
807 our $VERSION = ('$Revision: 2293 $' =~ m/(\d+)/)[0];
808 our $VERSION = ((require SomeOtherModule), $SomeOtherModule::VERSION)[1];
809 our $VERSION = (q$Revision: 2293 $ =~ /([\d\.]+)/);
810 our $VERSION = (q$Revision: 2293 $ =~ /(\d+)/g)[0];
811 our $VERSION = (qq$Revision: 2293 $ =~ /(\d+)/)[0];
812 our $VERSION = (qw$Revision: 2293 $)[-1];
813 our $VERSION = (qw$Revision: 2293 $)[1];
814 our $VERSION = (qw($Revision: 2293 $))[1];
815 our $VERSION = (split(/ /, '$Revision: 2293 $'))[1];
816 our $VERSION = (split(/ /, '$Revision: 2293 $'))[2];
817 our $VERSION = 1.2.3;
818 our $VERSION = 1.23;
819 our $VERSION = 1.2_3;
820 our $VERSION = 123;
821 our $VERSION = SomeOtherModule::RCSVersion('$Revision: 2293 $');
822 our $VERSION = SomeOtherModule::VERSION;
823 our $VERSION = [ qw{ $Revision: 2293 $ } ]->[1];
824 our $VERSION = do { (my $v = q%version: 1.23 %) =~ s/.*://; sprintf("%d.%d", split(/\./, $v), 0) };
825 our $VERSION = do { (my $v = q%version: 123 %) =~ s/.*://; sprintf("%d.%d", split(/\./, $v), 0) };
826 our $VERSION = do { q $Revision: 2293 $ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 };
827 our $VERSION = do { q$Revision: 2293 $ =~ /Revision: (\d+)/; sprintf "1.%d", $1; };
828 our $VERSION = do { require mod_perl2; $mod_perl2::VERSION };
829 our $VERSION = do {(q$URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/ValuesAndExpressions/ProhibitMagicNumbers.run $=~ m$.*/(?:tags|branches)/([^/ \t]+)$)[0] || "0.0"};
830 our $VERSION = eval { require version; version::qv((qw$Revision: 2293 $)[1] / 1000) };
831 our $VERSION = q$0.04$;
832 our $VERSION = q$Revision: 2293 $;
833 our $VERSION = q(0.14);
834 our $VERSION = qv('1.2.3');
835 our $VERSION = qw(1.2.3);
836 our $VERSION = sprintf "%.02f", $local_variable/100 + 0.3;
837 our $VERSION = sprintf "%.3f", 123 + substr(q$Revision: 2293 $, 4)/1000;
838 our $VERSION = sprintf "%d.%d", '$Revision: 2293 $' =~ /(\d+)\.(\d+)/;
839 our $VERSION = sprintf "%d.%d", '$Revision: 2293 $' =~ /(\d+)/g;
840 our $VERSION = sprintf "%d.%d", '$Revision: 2293 $' =~ /(\d+)\.(\d+)/;
841 our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ /: (\d+)\.(\d+)/;
842 our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ /(\d+)/g;
843 our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ /(\d+)\.(\d+)/;
844 our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ /(\d+)\.(\d+)/g;
845 our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ /: (\d+)\.(\d+)/;
846 our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ m/ (\d+) \. (\d+) /xg;
847 our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ ~~ m:P5:g/(\d+)/;
848 our $VERSION = sprintf "%d.%d%d", (split /\D+/, '$Name: beta0_1_1 $')[1..3];
849 our $VERSION = sprintf "%s.%s%s", q$Name: Rel-0_90 $ =~ /^Name: Rel-(\d+)_(\d+)(_\d+|)\s*$/, 999, "00", join "", (gmtime)[5] +1900, map {sprintf "%d", $_} (gmtime)[4]+1;
850 our $VERSION = sprintf "1.%d", '$Revision: 2293 $' =~ /(\d+)/;
851 our $VERSION = sprintf "1.%d", q$Revision: 2293 $ =~ /(\d+)/g;
852 our $VERSION = sprintf '%d.%d', (q$Revision: 2293 $ =~ /(\d+)\.(\d+)/);
853 our $VERSION = sprintf '%d.%d', q$Revision: 2293 $ =~ /(\d+)\.(\d+)/;
854 our $VERSION = sprintf '%d.%d', q$Revision: 2293 $ =~ /(\d+)\.(\d+)/;
855 our $VERSION = sprintf '%s', 'q$Revision: 2293 $' =~ /\S+\s+(\S+)\s+/ ;
856 our $VERSION = sprintf '%s', 'q$Revision: 2293 $' =~ /\S+\s+(\S+)\s+/ ;
857 our $VERSION = sprintf '%s', q$Revision: 2293 $ =~ /Revision:\s+(\S+)\s+/ ;
858 our $VERSION = sprintf '%s', q{$Revision: 2293 $} =~ /\S+\s+(\S+)/ ;
859 our $VERSION = sprintf '1.%d', (q$Revision: 2293 $ =~ /\D(\d+)\s*$/)[0] + 15;
860 our $VERSION = sprintf("%d", q$Id: SomeModule.pm,v 1.23 2006/04/10 22:39:38 matthew Exp $ =~ /\s(\d+)\s/);
861 our $VERSION = sprintf("%d", q$Id: SomeModule.pm,v 1.23 2006/04/10 22:39:39 matthew Exp $ =~ /\s(\d+)\s/);
862 our $VERSION = sprintf("%d.%d", "Revision: 2006.0626" =~ /(\d+)\.(\d+)/);
863 our $VERSION = sprintf("%d.%d", '$Name: v0_018-2006-06-15b $' =~ /(\d+)_(\d+)/, 0, 0);
864 our $VERSION = sprintf("%d.%d", 0, q$Revision: 2293 $ =~ /(\d+)\.(\d+)/);
865 our $VERSION = sprintf("%d.%d", q$Name: REL-0-13 $ =~ /(\d+)-(\d+)/, 999, 99);
866 our $VERSION = sprintf("%d.%d", q$Name: ical-parser-html-1-6 $ =~ /(\d+)-(\d+)/);
867 our $VERSION = sprintf("%d.%d", q$Revision: 2293 $ =~ /(\d+)\.(\d+)/);
868 our $VERSION = sprintf("%d.%d", q$Revision: 2293 $ =~ /(\d+)\.(\d+)/o);
869 our $VERSION = sprintf("%d.%d", q$Revision: 2293 $ =~ m/(\d+)\.(\d+)/);
870 our $VERSION = sprintf("%d.%d", q$Revision: 2293 $=~/(\d+)\.(\d+)/);
871 our $VERSION = sprintf("%d.%d", q'$Revision: 2293 $' =~ /(\d+)\.(\d+)/);
872 our $VERSION = sprintf("%d.%d.%d", 0, q$Revision: 2293 $ =~ /(\d+)\.(\d+)/);
873 our $VERSION = sprintf("1.%d", q$Revision: 2293 $ =~ / (\d+) /);
874 our $VERSION = sprintf("1.%d", q$Revision: 2293 $ =~ /(\d+)/);
875 our $VERSION = sprintf("1.2%d%d", q$Revision: 2293 $ =~ /(\d+)\.(\d+)/);
876 our $VERSION = sprintf('%d.%d', '$Revision: 2293 $' =~ /(\d+)\.(\d+)/);
877 our $VERSION = sprintf('%d.%d', q$Revision: 2293 $ =~ /(\d+)\.(\d+)/);
878 our $VERSION = sprintf('%d.%d', q$Revision: 2293 $ =~ /(\d+)\.(\d+)/);
879 our $VERSION = substr q$Revision: 2293 $, 10;
880 our $VERSION = substr(q$Revision: 2293 $, 10);
881 our $VERSION = v1.2.3.0;
882 our $VERSION = v1.2.3;
883 our $VERSION = v1.23;
884 our $VERSION = version->new('1.2.3');
885 our $VERSION = version->new(qw$Revision: 2293 $);
886 our ($PACKAGE, $VERSION) = ('') x 2;
887 our ($VERSION) = "1.23";
888 our ($VERSION) = $SomeOtherModule::VERSION;
889 our ($VERSION) = '$Revision: 2293 $' =~ /\$Revision:\s+([^\s]+)/;
890 our ($VERSION) = '$Revision: 2293 $' =~ /\$Revision:\s+([^\s]+)/;
891 our ($VERSION) = '$Revision: 2293 $' =~ m{ \$Revision: \s+ (\S+) }x;
892 our ($VERSION) = '$Revision: 2293 $' =~ m{ \$Revision: \s+ (\S+) }xm;
893 our ($VERSION) = '$Revision: 2293 $'=~/(\d+(\.\d+))/;
894 our ($VERSION) = '$Revision: 2293 $' =~ m{ \$Revision: \s+ (\S+) }x;
895 our ($VERSION) = '1.23' =~ /([.,\d]+)/;
896 our ($VERSION) = '1.23';
897 our ($VERSION) = ($local_variable =~ /(\d+\.\d+)/);
898 our ($VERSION) = ('$Revision: 2293 $' =~ /(\d+\.\d+)/) ;
899 our ($VERSION) = ('$Revision: 2293 $' =~ /(\d+\.\d+)/);
900 our ($VERSION) = ('$Revision: 2293 $' =~ m/([\.\d]+)/) ;
901 our ($VERSION) = (q$Revision: 2293 $ =~ /([\d\.]+)/);
902 our ($VERSION) = (qq$Revision: 2293 $ =~ /(\d+)/)[0];
903 our ($VERSION) = 1.23;
904 our ($VERSION) = q$Revision: 2293 $ =~ /Revision:\s+(\S+)/ or $VERSION = "1.23";
905 our ($VERSION) = q$Revision: 2293 $ =~ /Revision:\s+(\S+)/ or $VERSION = '1.23';
906 our ($VERSION) = q$Revision: 2293 $ =~ /[\d.]+/g;
907 our ($VERSION) = q$Revision: 2293 $ =~ /^Revision:\s+(\S+)/ or $VERSION = "1.23";
908 require SomeOtherModule; our $VERSION = $SomeOtherModule::VERSION;
909 use SomeOtherModule; our $VERSION = $SomeOtherModule::VERSION;
910 use SomeOtherModule; our $VERSION = SomeOtherModule::VERSION;
911 use base 'SomeOtherModule'; our $VERSION = $SomeOtherModule::VERSION;
912 use version; our $VERSION = 1.23;
913 use version; our $VERSION = qv("1.2.3");
914 use version; our $VERSION = qv('1.2.3');
915 use version; our $VERSION = qv('1.23');
916 use version; our $VERSION = qv((qw$Revision: 2293 $)[1] / 1000);
917 use version; our $VERSION = version->new('1.23');
918
919 #-----------------------------------------------------------------------------
920
921 ##############################################################################
922 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/ValuesAndExpressions/ProhibitMagicNumbers.run $
923 #     $Date: 2008-05-04 12:18:31 -0500 (Sun, 04 May 2008) $
924 #   $Author: clonezone $
925 # $Revision: 2293 $
926 ##############################################################################
927
928 # Local Variables:
929 #   mode: cperl
930 #   cperl-indent-level: 4
931 #   fill-column: 78
932 #   indent-tabs-mode: nil
933 #   c-indentation-style: bsd
934 # End:
935 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :