1 ## name Version numbers allowed in use statements.
7 ## name Version numbers allowed in require statements.
13 ## name Version numbers not allowed in regular statements.
19 ## name All numbers are allowed on any use statement.
23 use Test::More plan => 57;
25 ## name Numbers allowed on plan statements.
31 ## name Decimal zero is allowed anywhere.
37 ## name Floating-point zero is allowed anywhere.
43 ## name Decimal one is allowed anywhere.
49 ## name Floating-point one is allowed anywhere.
55 ## name Decimal two is allowed anywhere.
61 ## name Floating-point two is allowed anywhere.
67 ## name Fractional numbers not allowed in regular statements.
73 ## name Negative one is not allowed by default.
79 ## name The answer to life, the universe, and everything is not allowed in regular statements.
83 $frobnication_factor = 42;
85 ## name The answer to life, the universe, and everything is allowed as a constant.
89 use constant FROBNICATION_FACTOR => 42;
91 ## name Fractional numbers are allowed as a constant.
95 use constant FROBNICATION_FACTOR => 1_234.567_89;
97 ## name The Readonly subroutine works.
103 Readonly $frobnication_factor => 57;
105 ## name The Readonly::Scalar subroutine works.
111 Readonly::Scalar $frobnication_factor => 57;
113 ## name The Readonly::Scalar1 subroutine does not work.
119 Readonly::Scalar1 $frobnication_factor => 57;
121 ## name The Readonly::Array subroutine works.
127 Readonly::Array @frobnication_factors => ( 57, 193, 49675 );
129 ## name The Readonly::Array1 subroutine does not work.
135 Readonly::Array1 @frobnication_factors => ( 57, 193, 49675 );
137 ## name The Readonly::Hash subroutine works.
143 Readonly::Hash %frobnication_factors => ( 57 => 290 );
145 ## name The Readonly::Hash1 subroutine does not work.
151 Readonly::Hash1 %frobnication_factors => ( 57 => 290 );
153 ## name Constant subroutines containing just a number are allowed.
157 sub constant_subroutine { 104598 }
159 ## name Constant subroutines containing "return" and a number are allowed.
163 sub constant_subroutine { return 9068; }
165 ## name Subroutines that contain something other than a constant return value are not allowed.
169 sub constant_subroutine {
174 ## name Magic numbers not allowed in ranges.
178 foreach my $solid (1..5) {
182 ## name Readonly numbers allowed in ranges.
188 Readonly my $REGULAR_GEOMETRIC_SOLIDS => 5;
190 foreach my $solid (1..$REGULAR_GEOMETRIC_SOLIDS) {
194 ## name Binary zero isn't allowed in regular statements.
200 ## name Readonly binary zero is allowed.
204 Readonly $giant_eel => 0b0;
206 ## name Binary one isn't allowed in regular statements.
212 ## name Readonly binary one is allowed.
216 Readonly $creeping_coins => 0b1;
218 ## name Octal zero isn't allowed in regular statements.
224 ## name Readonly octal zero is allowed.
228 Readonly $dwarf_lord => 000;
230 ## name Octal one isn't allowed in regular statements.
236 ## name Readonly octal one is allowed.
240 Readonly $kobold_zombie => 001;
242 ## name Hexadecimal zero isn't allowed in regular statements.
248 ## name Readonly hexadecimal zero is allowed.
252 Readonly $newt => 0x00;
254 ## name Hexadecimal one isn't allowed in regular statements.
260 ## name Readonly hexadecimal one is allowed.
264 Readonly $Lord_Surtur => 0x01;
266 ## name Exponential zero isn't allowed in regular statements.
272 ## name Readonly exponential zero is allowed.
276 Readonly $sasquatch => 0e0;
278 ## name Exponential one isn't allowed in regular statements.
284 ## name Readonly exponential one is allowed.
288 Readonly $leather_golem => 1e0;
290 ## name Any numbers allowed in array references in use statement.
294 use Some::Module [ 1, 2, 3, 4 ];
296 ## name Any numbers allowed in array references in require statement.
300 require Some::Other::Module [ 1, 2, 3, 4 ];
302 ## name Any numbers allowed in array references in readonly statement.
306 Readonly $Totoro => [ 1, 2, 3, 4 ];
308 ## name Magic numbers not allowed in array references in regular statement.
312 $Evil_Iggy = [ 1, 2, 3, 4 ];
314 ## name Array references containing only good numbers are allowed (by this policy).
318 $titanothere = [ 1, 0, 1, 0 ];
320 ## name Any numbers allowed in hash references in use statement.
324 use Some::Module { 1 => 2, 3 => 4 };
326 ## name Any numbers allowed in hash references in require statement.
330 require Some::Other::Module { 1 => 2, 3 => 4 };
332 ## name Any numbers allowed in hash references in readonly statement.
336 Readonly $Vlad_the_Impaler => { 1 => 2, 3 => 4 };
338 ## name Magic numbers not allowed in hash references in regular statement.
342 $gnome_lord = { 1 => 2, 3 => 4 };
344 ## name Hash references containing only good numbers are allowed (by this policy).
348 $aardvark = { 1 => 0, 0 => 1 };
350 ## name Any numbers allowed in lists in use statement.
354 use Some::Module ( 1, 2, 3, 4 );
356 ## name Any numbers allowed in lists in require statement.
360 require Some::Other::Module ( 1, 2, 3, 4 );
362 ## name Any numbers allowed in lists in readonly statement.
366 Readonly @elf_mummy => ( 1, 2, 3, 4 );
368 ## name Magic numbers not allowed in lists in regular statement.
372 @kitten = ( 1, 2, 3, 4 );
374 ## name Lists containing only good numbers are allowed (by this policy).
378 @purple_worm = ( 1, 0, 1, 0 );
380 ## name Magic numbers not allowed in nested lists in regular statement.
384 @quivering_blob = ( 1, ( 2, 3, 4 ) );
386 ## name Magic numbers not allowed in nested array references in regular statement.
390 @green_slime = ( 1, [ 2, 3, 4 ] );
392 ## name Magic numbers not allowed in nested hash references in regular statement.
396 @fire_elemental = ( 1, { 2 => 4 } );
398 ## name Good numbers allowed in nested hash references anywhere.
402 @Y2K_bug = ( 1, { 0 => 1 } );
404 ## name Magic numbers not allowed in deep data structures in regular statement.
408 @fog_cloud = [ 1, { 0 => { 1 => [ 1, 1, [ \382 ] ] } } ];
410 ## name Good numbers allowed in deep datastructures anywhere.
414 @fog_cloud = [ 1, { 0 => { 1 => [ 1, 1, [ 1 ] ] } } ];
416 ## name $VERSION variables get a special exemption.
422 ## name Last element of an array gets a special exemption.
426 $Invid = $nalfeshnee[-1];
428 ## name Last element exemption does not work if there is anything else within the subscript.
432 $warhorse = $Cerberus[-1 * 1];
434 ## name Penultimate element of an array does not get a special exemption.
438 $scorpion = $shadow[-2];
440 ## name Decimal zero is allowed even if the configuration specifies that there aren't any allowed literals.
442 ## parms { allowed_values => '' }
447 ## name Floating-point zero is allowed even if the configuration specifies that there aren't any allowed literals.
449 ## parms { allowed_values => '' }
454 ## name Decimal one is allowed even if the configuration specifies that there aren't any allowed literals.
456 ## parms { allowed_values => '' }
461 ## name Floating-point one is allowed even if the configuration specifies that there aren't any allowed literals.
463 ## parms { allowed_values => '' }
468 ## name Decimal two is not allowed if the configuration specifies that there aren't any allowed literals.
470 ## parms { allowed_values => '' }
475 ## name Floating-point two is not allowed if the configuration specifies that there aren't any allowed literals.
477 ## parms { allowed_values => '' }
482 ## name Decimal zero is allowed even if the configuration doesn't include it in the allowed literals.
484 ## parms { allowed_values => '3 -5' }
489 ## name Floating-point zero is allowed even if the configuration doesn't include it in the allowed literals.
491 ## parms { allowed_values => '3 -5' }
496 ## name Decimal one is allowed even if the configuration doesn't include it in the allowed literals.
498 ## parms { allowed_values => '3 -5' }
503 ## name Floating-point one is allowed even if the configuration doesn't include it in the allowed literals.
505 ## parms { allowed_values => '3 -5' }
510 ## name Decimal two is not allowed if the configuration doesn't include it in the allowed literals.
512 ## parms { allowed_values => '3 -5' }
517 ## name Floating-point two is not allowed if the configuration doesn't include it in the allowed literals.
519 ## parms { allowed_values => '3 -5' }
524 ## name Decimal three is allowed if the configuration includes it in the allowed literals.
526 ## parms { allowed_values => '3 -5' }
531 ## name Floating-point three is allowed if the configuration includes it in the allowed literals.
533 ## parms { allowed_values => '3 -5' }
536 $water_elemental = 3.0;
538 ## name Decimal negative five is allowed if the configuration includes it in the allowed literals.
540 ## parms { allowed_values => '3 -5' }
545 ## name Floating-point negative five is allowed if the configuration includes it in the allowed literals.
547 ## parms { allowed_values => '3 -5' }
552 ## name Decimal zero is allowed even if the configuration specifies that there aren't any allowed types.
554 ## parms { allowed_types => '' }
559 ## name Floating-point zero is not allowed if the configuration specifies that there aren't any allowed types.
561 ## parms { allowed_types => '' }
566 ## name Decimal one is allowed even if the configuration specifies that there aren't any allowed types.
568 ## parms { allowed_types => '' }
573 ## name Floating-point one is not allowed if the configuration specifies that there aren't any allowed types.
575 ## parms { allowed_types => '' }
580 ## name Decimal zero is allowed if the configuration specifies that there are any allowed types.
582 ## parms { allowed_types => 'Float' }
587 ## name Floating-point zero is allowed if the configuration specifies that the Float type is allowed.
589 ## parms { allowed_types => 'Float' }
594 ## name Decimal one is allowed if the configuration specifies that there are any allowed types.
596 ## parms { allowed_types => 'Float' }
601 ## name Floating-point one is allowed if the configuration specifies that the Float type is allowed.
603 ## parms { allowed_types => 'Float' }
608 ## name Binary zero is allowed if the configuration specifies that the Binary type is allowed.
610 ## parms { allowed_types => 'Binary' }
615 ## name Binary one is allowed if the configuration specifies that the Binary type is allowed.
617 ## parms { allowed_types => 'Binary' }
622 ## name Exponential zero is allowed if the configuration specifies that the Exp type is allowed.
624 ## parms { allowed_types => 'Exp' }
629 ## name Exponential one is allowed if the configuration specifies that the Exp type is allowed.
631 ## parms { allowed_types => 'Exp' }
636 ## name Hexadecimal zero is allowed if the configuration specifies that the Hex type is allowed.
638 ## parms { allowed_types => 'Hex' }
643 ## name Hexadecimal one is allowed if the configuration specifies that the Hex type is allowed.
645 ## parms { allowed_types => 'Hex' }
650 ## name Octal zero is allowed if the configuration specifies that the Octal type is allowed.
652 ## parms { allowed_types => 'Octal' }
657 ## name Octal one is allowed if the configuration specifies that the Octal type is allowed.
659 ## parms { allowed_types => 'Octal' }
664 ## name Any integer value should pass if the allowed values contains 'all_integers'.
666 ## parms { allowed_values => 'all_integers' }
669 $brogmoid = 356_634_627;
672 ## name Any floating-point value without a fractional portion should pass if the allowed values contains 'all_integers'.
674 ## parms { allowed_values => 'all_integers' }
679 ## name A non-integral value should pass if the allowed values contains it and 'all_integers'.
681 ## parms { allowed_values => 'all_integers 429.73902' }
686 ## name Any binary value should pass if the allowed values contains 'all_integers' and allowed types includes 'Binary'.
688 ## parms { allowed_values => 'all_integers', allowed_types => 'Binary' }
691 $baby_blue_dragon = 0b01100101_01101010_01110011;
693 ## name Any hexadecimal value should pass if the allowed values contains 'all_integers' and allowed types includes 'Hex'.
695 ## parms { allowed_values => 'all_integers', allowed_types => 'Hex' }
698 $killer_bee = 0x656a73;
700 ## name Any octal value should pass if the allowed values contains 'all_integers' and allowed types includes 'Octal'.
702 ## parms { allowed_values => 'all_integers', allowed_types => 'Octal' }
705 $ettin_mummy = 0145_152_163;
707 ## name Zero, one, three, four, and five decimal values should pass if the allowed values contains the '3..5' range.
709 ## parms { allowed_values => '3..5' }
714 $Master_Assassin = 3;
718 ## name Negative one, two, and six decimal values and fractional values should not pass if the allowed values contains the '3..5' range.
720 ## parms { allowed_values => '3..5' }
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.
730 ## parms { allowed_values => '-1.5..3.5:by(0.5)' }
733 $owlbear = [ -1.5, -1, -.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5 ];
735 ## name Negative two and four should not pass if the allowed values contains the '-1.5..3.5:by(0.5)' range.
737 ## parms { allowed_values => '-1.5..3.5:by(0.5)' }
740 $lurker_above = [ -2, 4 ];
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.
744 ## parms { allowed_values => '-1.5..3.5' }
747 $long_worm = [ -1.5, -.5, 0, 0.5, 1, 1.5, 2.5, 3.5 ];
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'.
751 ## parms { allowed_values => 'all_integers -1.5..3.5' }
754 $ice_devil = [ -1.5, -1, -.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5 ];
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.
758 ## parms { allowed_values => '-5..-2 21..24' }
761 $newt = [ -5, -4, -3, -2, 0, 1, 21, 22, 23, 24 ];
763 ## name Should pass mini-CPAN accumulated \$VERSION declarations.
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;
819 our $VERSION = 1.2_3;
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');
919 #-----------------------------------------------------------------------------
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 $
926 ##############################################################################
930 # cperl-indent-level: 4
932 # indent-tabs-mode: nil
933 # c-indentation-style: bsd
935 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :