File: ProhibitMagicNumbers.run

package info (click to toggle)
libperl-critic-perl 1.156-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,544 kB
  • sloc: perl: 24,092; lisp: 341; makefile: 7
file content (998 lines) | stat: -rw-r--r-- 27,228 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
## name Version numbers allowed in use statements.
## failures 0
## cut

use 5.8.1;

## name Version numbers allowed in require statements.
## failures 0
## cut

require 5.8.1;

## name Version numbers not allowed in regular statements.
## failures 1
## cut

$Aleax = 5.8.1;

## name All numbers are allowed on any use statement.
## failures 0
## cut

use Test::More plan => 57;

## name Numbers allowed on plan statements.
## failures 0
## cut

plan tests => 2349;

## name Decimal zero is allowed anywhere.
## failures 0
## cut

$tangle_tree = 0;

## name Floating-point zero is allowed anywhere.
## failures 0
## cut

$xiron_golem = 0.0

## name Decimal one is allowed anywhere.
## failures 0
## cut

$killer_tomato = 1;

## name Floating-point one is allowed anywhere.
## failures 0
## cut

$witch_doctor = 1.0;

## name Decimal two is allowed anywhere.
## failures 0
## cut

$gold_golem = 2;

## name Floating-point two is allowed anywhere.
## failures 0
## cut

$lich = 2.0;

## name Fractional numbers not allowed in regular statements.
## failures 1
## cut

$soldier = 2.5;

## name Negative one is not allowed by default.
## failures 1
## cut

$giant_pigmy = -1;

## name The answer to life, the universe, and everything is not allowed in regular statements.
## failures 1
## cut

$frobnication_factor = 42;

## name The answer to life, the universe, and everything is allowed as a constant.
## failures 0
## cut

use constant FROBNICATION_FACTOR => 42;

## name Fractional numbers are allowed as a constant.
## failures 0
## cut

use constant FROBNICATION_FACTOR => 1_234.567_89;

## name The Readonly subroutine works.
## failures 0
## cut

use Readonly;

Readonly $frobnication_factor => 57;

## name The Readonly::Scalar subroutine works.
## failures 0
## cut

use Readonly;

Readonly::Scalar $frobnication_factor => 57;

## name The Readonly::Scalar1 subroutine does work if allow_to_the_right_of_a_fat_comma is set.
## failures 0
## cut

use Readonly;

Readonly::Scalar1 $frobnication_factor => 57;

## name The Readonly::Scalar1 subroutine does not work if allow_to_the_right_of_a_fat_comma is not set.
## failures 1
## parms { allow_to_the_right_of_a_fat_comma => 0 }
## cut

use Readonly;

Readonly::Scalar1 $frobnication_factor => 57;

## name The Readonly::Array subroutine works.
## failures 0
## cut

use Readonly;

Readonly::Array @frobnication_factors => ( 57, 193, 49675 );

## name The Readonly::Array1 subroutine does not work.
## failures 3
## cut

use Readonly;

Readonly::Array1 @frobnication_factors => ( 57, 193, 49675 );

## name The Readonly::Hash subroutine works.
## failures 0
## cut

use Readonly;

Readonly::Hash %frobnication_factors => ( 57 => 290 );

## name The Readonly::Hash1 subroutine does work if allow_to_the_right_of_a_fat_comma is set.
## failures 0
## cut

use Readonly;

Readonly::Hash1 %frobnication_factors => ( quhh => 290 );

## name The Readonly::Hash1 subroutine does not work if allow_to_the_right_of_a_fat_comma is not set.
## failures 1
## parms { allow_to_the_right_of_a_fat_comma => 0 }
## cut

use Readonly;

Readonly::Hash1 %frobnication_factors => ( quhh => 290 );

## name Const::Fast works even if allow_to_the_right_of_a_fat_comma is not set.
## failures 0
## parms { allow_to_the_right_of_a_fat_comma => 0 }
## cut

use Const::Fast;

const my $frobnication_factor => 57;

## name Constant subroutines containing just a number are allowed.
## failures 0
## cut

sub constant_subroutine { 104598 }

## name Constant subroutines containing "return" and a number are allowed.
## failures 0
## cut

sub constant_subroutine { return 9068; }

## name Subroutines that contain something other than a constant return value are not allowed.
## failures 1
## cut

sub constant_subroutine {
    print 'blah';
    return 9068;
}

## name Magic numbers not allowed in ranges.
## failures 1
## cut

foreach my $solid (1..5) {
    frobnicate($solid);
}

## name Readonly numbers allowed in ranges.
## failures 0
## cut

use Readonly;

Readonly my $REGULAR_GEOMETRIC_SOLIDS => 5;

foreach my $solid (1..$REGULAR_GEOMETRIC_SOLIDS) {
    frobnicate($solid);
}

## name Binary zero isn't allowed in regular statements.
## failures 1
## cut

$battlemech = 0b0;

## name Readonly binary zero is allowed.
## failures 0
## cut

Readonly $giant_eel => 0b0;

## name Binary one isn't allowed in regular statements.
## failures 1
## cut

$xeroc = 0b1;

## name Readonly binary one is allowed.
## failures 0
## cut

Readonly $creeping_coins => 0b1;

## name Octal zero isn't allowed in regular statements.
## failures 1
## cut

$basilisk = 000;

## name Readonly octal zero is allowed.
## failures 0
## cut

Readonly $dwarf_lord => 000;

## name Octal one isn't allowed in regular statements.
## failures 1
## cut

$brown_mold = 001;

## name Readonly octal one is allowed.
## failures 0
## cut

Readonly $kobold_zombie => 001;

## name Hexadecimal zero isn't allowed in regular statements.
## failures 1
## cut

$yeti = 0x00;

## name Readonly hexadecimal zero is allowed.
## failures 0
## cut

Readonly $newt => 0x00;

## name Hexadecimal one isn't allowed in regular statements.
## failures 1
## cut

$piranha = 0x01;

## name Readonly hexadecimal one is allowed.
## failures 0
## cut

Readonly $Lord_Surtur => 0x01;

## name Exponential zero isn't allowed in regular statements.
## failures 1
## cut

$Green_elf = 0e0;

## name Readonly exponential zero is allowed.
## failures 0
## cut

Readonly $sasquatch => 0e0;

## name Exponential one isn't allowed in regular statements.
## failures 1
## cut

$Uruk_hai = 1e0;

## name Readonly exponential one is allowed.
## failures 0
## cut

Readonly $leather_golem => 1e0;

## name Any numbers allowed in array references in use statement.
## failures 0
## cut

use Some::Module [ 1, 2, 3, 4 ];

## name Any numbers allowed in array references in require statement.
## failures 0
## cut

require Some::Other::Module [ 1, 2, 3, 4 ];

## name Any numbers allowed in array references in readonly statement.
## failures 0
## cut

Readonly $Totoro => [ 1, 2, 3, 4 ];

## name Magic numbers not allowed in array references in regular statement.
## failures 2
## cut

$Evil_Iggy = [ 1, 2, 3, 4 ];

## name Array references containing only good numbers are allowed (by this policy).
## failures 0
## cut

$titanothere = [ 1, 0, 1, 0 ];

## name Any numbers allowed in hash references in use statement.
## failures 0
## parms { allow_to_the_right_of_a_fat_comma => 0 }
## cut

use Some::Module { a => 6, b => 4 };

## name Any numbers allowed in hash references in require statement.
## failures 0
## parms { allow_to_the_right_of_a_fat_comma => 0 }
## cut

require Some::Other::Module { a => 6, b => 4 };

## name Any numbers allowed in hash references in readonly statement.
## failures 0
## parms { allow_to_the_right_of_a_fat_comma => 0 }
## cut

Readonly $Vlad_the_Impaler => { a => 6, b => 4 };

## name Magic numbers allowed in hash references in regular statement if allow_to_the_right_of_a_fat_comma is set.
## failures 0
## cut

$gnome_lord = { a => 6, b => 4 };

## name Magic numbers not allowed in hash references in regular statement if allow_to_the_right_of_a_fat_comma is not set.
## failures 2
## parms { allow_to_the_right_of_a_fat_comma => 0 }
## cut

$gnome_lord = { a => 6, b => 4 };

## name Hash references containing only good numbers are allowed (by this policy).
## failures 0
## cut

$aardvark = { 1 => 0, 0 => 1 };

## name Any numbers allowed in lists in use statement.
## failures 0
## cut

use Some::Module ( 1, 2, 3, 4 );

## name Any numbers allowed in lists in require statement.
## failures 0
## cut

require Some::Other::Module ( 1, 2, 3, 4 );

## name Any numbers allowed in lists in readonly statement.
## failures 0
## cut

Readonly @elf_mummy => ( 1, 2, 3, 4 );

## name Magic numbers not allowed in lists in regular statement.
## failures 2
## cut

@kitten = ( 1, 2, 3, 4 );

## name Lists containing only good numbers are allowed (by this policy).
## failures 0
## cut

@purple_worm = ( 1, 0, 1, 0 );

## name Magic numbers not allowed in nested lists in regular statement.
## failures 2
## cut

@quivering_blob = ( 1, ( 2, 3, 4 ) );

## name Magic numbers not allowed in nested array references in regular statement.
## failures 2
## cut

@green_slime = ( 1, [ 2, 3, 4 ] );

## name Magic numbers allowed in nested hash references in regular statement if allow_to_the_right_of_a_fat_comma is set.
## failures 0
## cut

@fire_elemental = ( 1, { 2 => 4 } );

## name Magic numbers not allowed in nested hash references in regular statement if allow_to_the_right_of_a_fat_comma is not set.
## failures 1
## parms { allow_to_the_right_of_a_fat_comma => 0 }
## cut

@fire_elemental = ( 1, { 2 => 4 } );

## name Good numbers allowed in nested hash references anywhere.
## failures 0
## parms { allow_to_the_right_of_a_fat_comma => 0 }
## cut

@Y2K_bug = ( 1, { 0 => 1 } );

## name Magic numbers not allowed in deep data structures in regular statement.
## failures 1
## cut

@fog_cloud = [ 1, { 0 => { 1 => [ 1, 1, [ \382 ] ] } } ];

## name Good numbers allowed in deep datastructures anywhere.
## failures 0
## cut

@fog_cloud = [ 1, { 0 => { 1 => [ 1, 1, [ 1 ] ] } } ];

## name $VERSION variables get a special exemption.
## failures 0
## cut

our $VERSION = 0.21;

## name Last element of an array gets a special exemption.
## failures 0
## cut

$Invid = $nalfeshnee[-1];

## name Last element exemption does not work if there is anything else within the subscript.
## failures 1
## cut

$warhorse = $Cerberus[-1 * 1];

## name Penultimate element of an array does not get a special exemption.
## failures 1
## cut

$scorpion = $shadow[-2];

## name Decimal zero is allowed even if the configuration specifies that there aren't any allowed literals.
## failures 0
## parms { allowed_values => '' }
## cut

$tangle_tree = 0;

## name Floating-point zero is allowed even if the configuration specifies that there aren't any allowed literals.
## failures 0
## parms { allowed_values => '' }
## cut

$xiron_golem = 0.0

## name Decimal one is allowed even if the configuration specifies that there aren't any allowed literals.
## failures 0
## parms { allowed_values => '' }
## cut

$killer_tomato = 1;

## name Floating-point one is allowed even if the configuration specifies that there aren't any allowed literals.
## failures 0
## parms { allowed_values => '' }
## cut

$witch_doctor = 1.0;

## name Decimal two is not allowed if the configuration specifies that there aren't any allowed literals.
## failures 1
## parms { allowed_values => '' }
## cut

$gold_golem = 2;

## name Floating-point two is not allowed if the configuration specifies that there aren't any allowed literals.
## failures 1
## parms { allowed_values => '' }
## cut

$lich = 2.0;

## name Decimal zero is allowed even if the configuration doesn't include it in the allowed literals.
## failures 0
## parms { allowed_values => '3 -5' }
## cut

$tangle_tree = 0;

## name Floating-point zero is allowed even if the configuration doesn't include it in the allowed literals.
## failures 0
## parms { allowed_values => '3 -5' }
## cut

$xiron_golem = 0.0

## name Decimal one is allowed even if the configuration doesn't include it in the allowed literals.
## failures 0
## parms { allowed_values => '3 -5' }
## cut

$killer_tomato = 1;

## name Floating-point one is allowed even if the configuration doesn't include it in the allowed literals.
## failures 0
## parms { allowed_values => '3 -5' }
## cut

$witch_doctor = 1.0;

## name Decimal two is not allowed if the configuration doesn't include it in the allowed literals.
## failures 1
## parms { allowed_values => '3 -5' }
## cut

$gold_golem = 2;

## name Floating-point two is not allowed if the configuration doesn't include it in the allowed literals.
## failures 1
## parms { allowed_values => '3 -5' }
## cut

$lich = 2.0;

## name Decimal three is allowed if the configuration includes it in the allowed literals.
## failures 0
## parms { allowed_values => '3 -5' }
## cut

$ghoul = 3;

## name Floating-point three is allowed if the configuration includes it in the allowed literals.
## failures 0
## parms { allowed_values => '3 -5' }
## cut

$water_elemental = 3.0;

## name Decimal negative five is allowed if the configuration includes it in the allowed literals.
## failures 0
## parms { allowed_values => '3 -5' }
## cut

$glass_piercer = -5;

## name Floating-point negative five is allowed if the configuration includes it in the allowed literals.
## failures 0
## parms { allowed_values => '3 -5' }
## cut

$clay_golem = -5.0;

## name Decimal zero is allowed even if the configuration specifies that there aren't any allowed types.
## failures 0
## parms { allowed_types => '' }
## cut

$tangle_tree = 0;

## name Floating-point zero is not allowed if the configuration specifies that there aren't any allowed types.
## failures 1
## parms { allowed_types => '' }
## cut

$xiron_golem = 0.0

## name Decimal one is allowed even if the configuration specifies that there aren't any allowed types.
## failures 0
## parms { allowed_types => '' }
## cut

$killer_tomato = 1;

## name Floating-point one is not allowed if the configuration specifies that there aren't any allowed types.
## failures 1
## parms { allowed_types => '' }
## cut

$witch_doctor = 1.0;

## name Decimal zero is allowed if the configuration specifies that there are any allowed types.
## failures 0
## parms { allowed_types => 'Float' }
## cut

$tangle_tree = 0;

## name Floating-point zero is allowed if the configuration specifies that the Float type is allowed.
## failures 0
## parms { allowed_types => 'Float' }
## cut

$xiron_golem = 0.0

## name Decimal one is allowed if the configuration specifies that there are any allowed types.
## failures 0
## parms { allowed_types => 'Float' }
## cut

$killer_tomato = 1;

## name Floating-point one is allowed if the configuration specifies that the Float type is allowed.
## failures 0
## parms { allowed_types => 'Float' }
## cut

$witch_doctor = 1.0;

## name Binary zero is allowed if the configuration specifies that the Binary type is allowed.
## failures 0
## parms { allowed_types => 'Binary' }
## cut

$battlemech = 0b0;

## name Binary one is allowed if the configuration specifies that the Binary type is allowed.
## failures 0
## parms { allowed_types => 'Binary' }
## cut

$xeroc = 0b1;

## name Exponential zero is allowed if the configuration specifies that the Exp type is allowed.
## failures 0
## parms { allowed_types => 'Exp' }
## cut

$Green_elf = 0e0;

## name Exponential one is allowed if the configuration specifies that the Exp type is allowed.
## failures 0
## parms { allowed_types => 'Exp' }
## cut

$Uruk_hai = 1e0;

## name Hexadecimal zero is allowed if the configuration specifies that the Hex type is allowed.
## failures 0
## parms { allowed_types => 'Hex' }
## cut

$yeti = 0x00;

## name Hexadecimal one is allowed if the configuration specifies that the Hex type is allowed.
## failures 0
## parms { allowed_types => 'Hex' }
## cut

$piranha = 0x01;

## name Octal zero is allowed if the configuration specifies that the Octal type is allowed.
## failures 0
## parms { allowed_types => 'Octal' }
## cut

$basilisk = 000;

## name Octal one is allowed if the configuration specifies that the Octal type is allowed.
## failures 0
## parms { allowed_types => 'Octal' }
## cut

$brown_mold = 001;

## name Any integer value should pass if the allowed values contains 'all_integers'.
## failures 0
## parms { allowed_values => 'all_integers' }
## cut

$brogmoid = 356_634_627;
$rat_ant  =     -29_422;

## name Any floating-point value without a fractional portion should pass if the allowed values contains 'all_integers'.
## failures 0
## parms { allowed_values => 'all_integers' }
## cut

$human = 102_938.0;

## name A non-integral value should pass if the allowed values contains it and 'all_integers'.
## failures 0
## parms { allowed_values => 'all_integers 429.73902' }
## cut

$Norn = 429.73902;

## name Any binary value should pass if the allowed values contains 'all_integers' and allowed types includes 'Binary'.
## failures 0
## parms { allowed_values => 'all_integers', allowed_types => 'Binary' }
## cut

$baby_blue_dragon = 0b01100101_01101010_01110011;

## name Any hexadecimal value should pass if the allowed values contains 'all_integers' and allowed types includes 'Hex'.
## failures 0
## parms { allowed_values => 'all_integers', allowed_types => 'Hex' }
## cut

$killer_bee = 0x656a73;

## name Any octal value should pass if the allowed values contains 'all_integers' and allowed types includes 'Octal'.
## failures 0
## parms { allowed_values => 'all_integers', allowed_types => 'Octal' }
## cut

$ettin_mummy = 0145_152_163;

## name Zero, one, three, four, and five decimal values should pass if the allowed values contains the '3..5' range.
## failures 0
## parms { allowed_values => '3..5' }
## cut

$guide = 0;
$cuatl = 1;
$Master_Assassin = 3;
$orc = 4;
$trapper = 5;

## name Negative one, two, and six decimal values and fractional values should not pass if the allowed values contains the '3..5' range.
## failures 4
## parms { allowed_values => '3..5' }
## cut

$Elvenking = -1;
$brown_pudding = 2;
$archeologist = 6;
$nurse = 4.5;

## 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.
## failures 0
## parms { allowed_values => '-1.5..3.5:by(0.5)' }
## cut

$owlbear = [ -1.5, -1, -.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5 ];

## name Negative two and four should not pass if the allowed values contains the '-1.5..3.5:by(0.5)' range.
## failures 2
## parms { allowed_values => '-1.5..3.5:by(0.5)' }
## cut

$lurker_above = [ -2, 4 ];

## 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.
## failures 0
## parms { allowed_values => '-1.5..3.5' }
## cut

$long_worm = [ -1.5, -.5, 0, 0.5, 1, 1.5, 2.5, 3.5 ];

## 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'.
## failures 0
## parms { allowed_values => 'all_integers -1.5..3.5' }
## cut

$ice_devil = [ -1.5, -1, -.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5 ];

## 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.
## failures 0
## parms { allowed_values => '-5..-2 21..24' }
## cut

$newt = [ -5, -4, -3, -2, 0, 1, 21, 22, 23, 24 ];

## name Should pass mini-CPAN accumulated \$VERSION declarations.
## failures 0
## cut

(our $VERSION = q$Revision$) =~ s/Revision //;
(our $VERSION) = '$Revision$' =~ /([\d.]+)/;
(our $VERSION) = sprintf "%d", q$Revision$ =~ /Revision:\s+(\S+)/;
our $VERSION : unique = "1.23";
our $VERSION : unique = '1.23';
our $VERSION = "$local_variable v1.23";
our $VERSION = "1." . sprintf "%d", q$Revision$ =~ /: (\d+)/;
our $VERSION = "1.2.3";
our $VERSION = "1.2.3.0";
our $VERSION = "1.2.3.blah";
our $VERSION = "1.23 (liblgrp version $local_variable)";
our $VERSION = "1.23 2005-05-20";
our $VERSION = "1.23";
our $VERSION = "1.23, 2004-12-07";
our $VERSION = "1.23_blah";
our $VERSION = "1.23blah";
our $VERSION = "1.2_3";
our $VERSION = "123";
our $VERSION = "INSERT";
our $VERSION = $SomeOtherModule::VERSION;
our $VERSION = $VERSION = (qw($Revision$))[1];
our $VERSION = $local_variable;
our $VERSION = '$Date$'; $VERSION =~ s|^\$Date:\s*([0-9]{4})/([0-9]{2})/([0-9]{2})\s.*|\1.\2.\3| ;
our $VERSION = '$Revision$' =~ /\$Revision:\s+([^\s]+)/;
our $VERSION = '$Revision$';
our $VERSION = '-123 blah';
our $VERSION = '1.' . qw $Revision$[1];
our $VERSION = '1.' . sprintf "%d", (qw($Revision$))[1];
our $VERSION = '1.' . sprintf("%d", (qw($Revision$))[1]);
our $VERSION = '1.2.3';
our $VERSION = '1.2.3.0';
our $VERSION = '1.2.3blah';
our $VERSION = '1.23';
our $VERSION = '1.23_blah';
our $VERSION = '1.23blah';
our $VERSION = '1.2_3';
our $VERSION = '1.23' || do { q $Revision$ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 };
our $VERSION = '123';
our $VERSION = ('$Revision$' =~ /(\d+.\d+)/)[ 0];
our $VERSION = ('$Revision$' =~ /(\d+\.\d+)/);
our $VERSION = ('$Revision$' =~ m/(\d+)/)[0];
our $VERSION = ((require SomeOtherModule), $SomeOtherModule::VERSION)[1];
our $VERSION = (q$Revision$ =~ /([\d\.]+)/);
our $VERSION = (q$Revision$ =~ /(\d+)/g)[0];
our $VERSION = (qq$Revision$ =~ /(\d+)/)[0];
our $VERSION = (qw$Revision$)[-1];
our $VERSION = (qw$Revision$)[1];
our $VERSION = (qw($Revision$))[1];
our $VERSION = (split(/ /, '$Revision$'))[1];
our $VERSION = (split(/ /, '$Revision$'))[2];
our $VERSION = 1.2.3;
our $VERSION = 1.23;
our $VERSION = 1.2_3;
our $VERSION = 123;
our $VERSION = SomeOtherModule::RCSVersion('$Revision$');
our $VERSION = SomeOtherModule::VERSION;
our $VERSION = [ qw{ $Revision$ } ]->[1];
our $VERSION = do { (my $v = q%version: 1.23 %) =~ s/.*://; sprintf("%d.%d", split(/\./, $v), 0) };
our $VERSION = do { (my $v = q%version: 123 %) =~ s/.*://; sprintf("%d.%d", split(/\./, $v), 0) };
our $VERSION = do { q $Revision$ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 };
our $VERSION = do { q$Revision$ =~ /Revision: (\d+)/; sprintf "1.%d", $1; };
our $VERSION = do { require mod_perl2; $mod_perl2::VERSION };
our $VERSION = do {(q$URL$=~ m$.*/(?:tags|branches)/([^/ \t]+)$)[0] || "0.0"};
our $VERSION = eval { require version; version::qv((qw$Revision$)[1] / 1000) };
our $VERSION = q$0.04$;
our $VERSION = q$Revision$;
our $VERSION = q(0.14);
our $VERSION = qv('1.2.3');
our $VERSION = qw(1.2.3);
our $VERSION = sprintf "%.02f", $local_variable/100 + 0.3;
our $VERSION = sprintf "%.3f", 123 + substr(q$Revision$, 4)/1000;
our $VERSION = sprintf "%d.%d", '$Revision$' =~ /(\d+)\.(\d+)/;
our $VERSION = sprintf "%d.%d", '$Revision$' =~ /(\d+)/g;
our $VERSION = sprintf "%d.%d", '$Revision$' =~ /(\d+)\.(\d+)/;
our $VERSION = sprintf "%d.%d", q$Revision$ =~ /: (\d+)\.(\d+)/;
our $VERSION = sprintf "%d.%d", q$Revision$ =~ /(\d+)/g;
our $VERSION = sprintf "%d.%d", q$Revision$ =~ /(\d+)\.(\d+)/;
our $VERSION = sprintf "%d.%d", q$Revision$ =~ /(\d+)\.(\d+)/g;
our $VERSION = sprintf "%d.%d", q$Revision$ =~ /: (\d+)\.(\d+)/;
our $VERSION = sprintf "%d.%d", q$Revision$ =~ m/ (\d+) \. (\d+) /xg;
our $VERSION = sprintf "%d.%d", q$Revision$ ~~ m:P5:g/(\d+)/;
our $VERSION = sprintf "%d.%d%d", (split /\D+/, '$Name: beta0_1_1 $')[1..3];
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;
our $VERSION = sprintf "1.%d", '$Revision$' =~ /(\d+)/;
our $VERSION = sprintf "1.%d", q$Revision$ =~ /(\d+)/g;
our $VERSION = sprintf '%d.%d', (q$Revision$ =~ /(\d+)\.(\d+)/);
our $VERSION = sprintf '%d.%d', q$Revision$ =~ /(\d+)\.(\d+)/;
our $VERSION = sprintf '%d.%d', q$Revision$ =~ /(\d+)\.(\d+)/;
our $VERSION = sprintf '%s', 'q$Revision$' =~ /\S+\s+(\S+)\s+/ ;
our $VERSION = sprintf '%s', 'q$Revision$' =~ /\S+\s+(\S+)\s+/ ;
our $VERSION = sprintf '%s', q$Revision$ =~ /Revision:\s+(\S+)\s+/ ;
our $VERSION = sprintf '%s', q{$Revision$} =~ /\S+\s+(\S+)/ ;
our $VERSION = sprintf '1.%d', (q$Revision$ =~ /\D(\d+)\s*$/)[0] + 15;
our $VERSION = sprintf("%d", q$Id: SomeModule.pm,v 1.23 2006/04/10 22:39:38 matthew Exp $ =~ /\s(\d+)\s/);
our $VERSION = sprintf("%d", q$Id: SomeModule.pm,v 1.23 2006/04/10 22:39:39 matthew Exp $ =~ /\s(\d+)\s/);
our $VERSION = sprintf("%d.%d", "Revision: 2006.0626" =~ /(\d+)\.(\d+)/);
our $VERSION = sprintf("%d.%d", '$Name: v0_018-2006-06-15b $' =~ /(\d+)_(\d+)/, 0, 0);
our $VERSION = sprintf("%d.%d", 0, q$Revision$ =~ /(\d+)\.(\d+)/);
our $VERSION = sprintf("%d.%d", q$Name: REL-0-13 $ =~ /(\d+)-(\d+)/, 999, 99);
our $VERSION = sprintf("%d.%d", q$Name: ical-parser-html-1-6 $ =~ /(\d+)-(\d+)/);
our $VERSION = sprintf("%d.%d", q$Revision$ =~ /(\d+)\.(\d+)/);
our $VERSION = sprintf("%d.%d", q$Revision$ =~ /(\d+)\.(\d+)/o);
our $VERSION = sprintf("%d.%d", q$Revision$ =~ m/(\d+)\.(\d+)/);
our $VERSION = sprintf("%d.%d", q$Revision$=~/(\d+)\.(\d+)/);
our $VERSION = sprintf("%d.%d", q'$Revision$' =~ /(\d+)\.(\d+)/);
our $VERSION = sprintf("%d.%d.%d", 0, q$Revision$ =~ /(\d+)\.(\d+)/);
our $VERSION = sprintf("1.%d", q$Revision$ =~ / (\d+) /);
our $VERSION = sprintf("1.%d", q$Revision$ =~ /(\d+)/);
our $VERSION = sprintf("1.2%d%d", q$Revision$ =~ /(\d+)\.(\d+)/);
our $VERSION = sprintf('%d.%d', '$Revision$' =~ /(\d+)\.(\d+)/);
our $VERSION = sprintf('%d.%d', q$Revision$ =~ /(\d+)\.(\d+)/);
our $VERSION = sprintf('%d.%d', q$Revision$ =~ /(\d+)\.(\d+)/);
our $VERSION = substr q$Revision$, 10;
our $VERSION = substr(q$Revision$, 10);
our $VERSION = v1.2.3.0;
our $VERSION = v1.2.3;
our $VERSION = v1.23;
our $VERSION = version->new('1.2.3');
our $VERSION = version->new(qw$Revision$);
our ($PACKAGE, $VERSION) = ('') x 2;
our ($VERSION) = "1.23";
our ($VERSION) = $SomeOtherModule::VERSION;
our ($VERSION) = '$Revision$' =~ /\$Revision:\s+([^\s]+)/;
our ($VERSION) = '$Revision$' =~ /\$Revision:\s+([^\s]+)/;
our ($VERSION) = '$Revision$' =~ m{ \$Revision: \s+ (\S+) }x;
our ($VERSION) = '$Revision$' =~ m{ \$Revision: \s+ (\S+) }xm;
our ($VERSION) = '$Revision$'=~/(\d+(\.\d+))/;
our ($VERSION) = '$Revision$' =~ m{ \$Revision: \s+ (\S+) }x;
our ($VERSION) = '1.23' =~ /([.,\d]+)/;
our ($VERSION) = '1.23';
our ($VERSION) = ($local_variable =~ /(\d+\.\d+)/);
our ($VERSION) = ('$Revision$' =~ /(\d+\.\d+)/) ;
our ($VERSION) = ('$Revision$' =~ /(\d+\.\d+)/);
our ($VERSION) = ('$Revision$' =~ m/([\.\d]+)/) ;
our ($VERSION) = (q$Revision$ =~ /([\d\.]+)/);
our ($VERSION) = (qq$Revision$ =~ /(\d+)/)[0];
our ($VERSION) = 1.23;
our ($VERSION) = q$Revision$ =~ /Revision:\s+(\S+)/ or $VERSION = "1.23";
our ($VERSION) = q$Revision$ =~ /Revision:\s+(\S+)/ or $VERSION = '1.23';
our ($VERSION) = q$Revision$ =~ /[\d.]+/g;
our ($VERSION) = q$Revision$ =~ /^Revision:\s+(\S+)/ or $VERSION = "1.23";
require SomeOtherModule; our $VERSION = $SomeOtherModule::VERSION;
use SomeOtherModule; our $VERSION = $SomeOtherModule::VERSION;
use SomeOtherModule; our $VERSION = SomeOtherModule::VERSION;
use parent 'SomeOtherModule'; our $VERSION = $SomeOtherModule::VERSION;
use version; our $VERSION = 1.23;
use version; our $VERSION = qv("1.2.3");
use version; our $VERSION = qv('1.2.3');
use version; our $VERSION = qv('1.23');
use version; our $VERSION = qv((qw$Revision$)[1] / 1000);
use version; our $VERSION = version->new('1.23');

## name user-defined constant creators. RT #62562
## parms { allow_to_the_right_of_a_fat_comma => 0, constant_creator_subroutines => 'blahlahlah' }
## failures 0
## cut

blahlahlah my $answer => 42;

## name allow version as second argument of package. RT #67159
## failures 0
## cut

package Maggot 0.01;

## name do not allow numbers elsewhere in package statement. RT #67159
## failures 2
## cut

package 42; # Illegal, but check anyway.
package Maggot 0.01 42;

## name Confusion with numbered regex capture variables (GH #455)
## failures 0
## cut

my $x = $13;

#-----------------------------------------------------------------------------
# Local Variables:
#   mode: cperl
#   cperl-indent-level: 4
#   fill-column: 78
#   indent-tabs-mode: nil
#   c-indentation-style: bsd
# End:
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :