## 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 not work. ## failures 1 ## 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 not work. ## failures 2 ## cut use Readonly; Readonly::Hash1 %frobnication_factors => ( 57 => 290 ); ## 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 ## cut use Some::Module { 1 => 2, 3 => 4 }; ## name Any numbers allowed in hash references in require statement. ## failures 0 ## cut require Some::Other::Module { 1 => 2, 3 => 4 }; ## name Any numbers allowed in hash references in readonly statement. ## failures 0 ## cut Readonly $Vlad_the_Impaler => { 1 => 2, 3 => 4 }; ## name Magic numbers not allowed in hash references in regular statement. ## failures 2 ## cut $gnome_lord = { 1 => 2, 3 => 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 not allowed in nested hash references in regular statement. ## failures 1 ## cut @fire_elemental = ( 1, { 2 => 4 } ); ## name Good numbers allowed in nested hash references anywhere. ## failures 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: 2293 $) =~ s/Revision //; (our $VERSION) = '$Revision: 2293 $' =~ /([\d.]+)/; (our $VERSION) = sprintf "%d", q$Revision: 2293 $ =~ /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: 2293 $ =~ /: (\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: 2293 $))[1]; our $VERSION = $local_variable; 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| ; our $VERSION = '$Revision: 2293 $' =~ /\$Revision:\s+([^\s]+)/; our $VERSION = '$Revision: 2293 $'; our $VERSION = '-123 blah'; our $VERSION = '1.' . qw $Revision: 2293 $[1]; our $VERSION = '1.' . sprintf "%d", (qw($Revision: 2293 $))[1]; our $VERSION = '1.' . sprintf("%d", (qw($Revision: 2293 $))[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: 2293 $ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 }; our $VERSION = '123'; our $VERSION = ('$Revision: 2293 $' =~ /(\d+.\d+)/)[ 0]; our $VERSION = ('$Revision: 2293 $' =~ /(\d+\.\d+)/); our $VERSION = ('$Revision: 2293 $' =~ m/(\d+)/)[0]; our $VERSION = ((require SomeOtherModule), $SomeOtherModule::VERSION)[1]; our $VERSION = (q$Revision: 2293 $ =~ /([\d\.]+)/); our $VERSION = (q$Revision: 2293 $ =~ /(\d+)/g)[0]; our $VERSION = (qq$Revision: 2293 $ =~ /(\d+)/)[0]; our $VERSION = (qw$Revision: 2293 $)[-1]; our $VERSION = (qw$Revision: 2293 $)[1]; our $VERSION = (qw($Revision: 2293 $))[1]; our $VERSION = (split(/ /, '$Revision: 2293 $'))[1]; our $VERSION = (split(/ /, '$Revision: 2293 $'))[2]; our $VERSION = 1.2.3; our $VERSION = 1.23; our $VERSION = 1.2_3; our $VERSION = 123; our $VERSION = SomeOtherModule::RCSVersion('$Revision: 2293 $'); our $VERSION = SomeOtherModule::VERSION; our $VERSION = [ qw{ $Revision: 2293 $ } ]->[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: 2293 $ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 }; our $VERSION = do { q$Revision: 2293 $ =~ /Revision: (\d+)/; sprintf "1.%d", $1; }; our $VERSION = do { require mod_perl2; $mod_perl2::VERSION }; 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"}; our $VERSION = eval { require version; version::qv((qw$Revision: 2293 $)[1] / 1000) }; our $VERSION = q$0.04$; our $VERSION = q$Revision: 2293 $; 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: 2293 $, 4)/1000; our $VERSION = sprintf "%d.%d", '$Revision: 2293 $' =~ /(\d+)\.(\d+)/; our $VERSION = sprintf "%d.%d", '$Revision: 2293 $' =~ /(\d+)/g; our $VERSION = sprintf "%d.%d", '$Revision: 2293 $' =~ /(\d+)\.(\d+)/; our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ /: (\d+)\.(\d+)/; our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ /(\d+)/g; our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ /(\d+)\.(\d+)/; our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ /(\d+)\.(\d+)/g; our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ /: (\d+)\.(\d+)/; our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ =~ m/ (\d+) \. (\d+) /xg; our $VERSION = sprintf "%d.%d", q$Revision: 2293 $ ~~ 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: 2293 $' =~ /(\d+)/; our $VERSION = sprintf "1.%d", q$Revision: 2293 $ =~ /(\d+)/g; our $VERSION = sprintf '%d.%d', (q$Revision: 2293 $ =~ /(\d+)\.(\d+)/); our $VERSION = sprintf '%d.%d', q$Revision: 2293 $ =~ /(\d+)\.(\d+)/; our $VERSION = sprintf '%d.%d', q$Revision: 2293 $ =~ /(\d+)\.(\d+)/; our $VERSION = sprintf '%s', 'q$Revision: 2293 $' =~ /\S+\s+(\S+)\s+/ ; our $VERSION = sprintf '%s', 'q$Revision: 2293 $' =~ /\S+\s+(\S+)\s+/ ; our $VERSION = sprintf '%s', q$Revision: 2293 $ =~ /Revision:\s+(\S+)\s+/ ; our $VERSION = sprintf '%s', q{$Revision: 2293 $} =~ /\S+\s+(\S+)/ ; our $VERSION = sprintf '1.%d', (q$Revision: 2293 $ =~ /\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: 2293 $ =~ /(\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: 2293 $ =~ /(\d+)\.(\d+)/); our $VERSION = sprintf("%d.%d", q$Revision: 2293 $ =~ /(\d+)\.(\d+)/o); our $VERSION = sprintf("%d.%d", q$Revision: 2293 $ =~ m/(\d+)\.(\d+)/); our $VERSION = sprintf("%d.%d", q$Revision: 2293 $=~/(\d+)\.(\d+)/); our $VERSION = sprintf("%d.%d", q'$Revision: 2293 $' =~ /(\d+)\.(\d+)/); our $VERSION = sprintf("%d.%d.%d", 0, q$Revision: 2293 $ =~ /(\d+)\.(\d+)/); our $VERSION = sprintf("1.%d", q$Revision: 2293 $ =~ / (\d+) /); our $VERSION = sprintf("1.%d", q$Revision: 2293 $ =~ /(\d+)/); our $VERSION = sprintf("1.2%d%d", q$Revision: 2293 $ =~ /(\d+)\.(\d+)/); our $VERSION = sprintf('%d.%d', '$Revision: 2293 $' =~ /(\d+)\.(\d+)/); our $VERSION = sprintf('%d.%d', q$Revision: 2293 $ =~ /(\d+)\.(\d+)/); our $VERSION = sprintf('%d.%d', q$Revision: 2293 $ =~ /(\d+)\.(\d+)/); our $VERSION = substr q$Revision: 2293 $, 10; our $VERSION = substr(q$Revision: 2293 $, 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: 2293 $); our ($PACKAGE, $VERSION) = ('') x 2; our ($VERSION) = "1.23"; our ($VERSION) = $SomeOtherModule::VERSION; our ($VERSION) = '$Revision: 2293 $' =~ /\$Revision:\s+([^\s]+)/; our ($VERSION) = '$Revision: 2293 $' =~ /\$Revision:\s+([^\s]+)/; our ($VERSION) = '$Revision: 2293 $' =~ m{ \$Revision: \s+ (\S+) }x; our ($VERSION) = '$Revision: 2293 $' =~ m{ \$Revision: \s+ (\S+) }xm; our ($VERSION) = '$Revision: 2293 $'=~/(\d+(\.\d+))/; our ($VERSION) = '$Revision: 2293 $' =~ m{ \$Revision: \s+ (\S+) }x; our ($VERSION) = '1.23' =~ /([.,\d]+)/; our ($VERSION) = '1.23'; our ($VERSION) = ($local_variable =~ /(\d+\.\d+)/); our ($VERSION) = ('$Revision: 2293 $' =~ /(\d+\.\d+)/) ; our ($VERSION) = ('$Revision: 2293 $' =~ /(\d+\.\d+)/); our ($VERSION) = ('$Revision: 2293 $' =~ m/([\.\d]+)/) ; our ($VERSION) = (q$Revision: 2293 $ =~ /([\d\.]+)/); our ($VERSION) = (qq$Revision: 2293 $ =~ /(\d+)/)[0]; our ($VERSION) = 1.23; our ($VERSION) = q$Revision: 2293 $ =~ /Revision:\s+(\S+)/ or $VERSION = "1.23"; our ($VERSION) = q$Revision: 2293 $ =~ /Revision:\s+(\S+)/ or $VERSION = '1.23'; our ($VERSION) = q$Revision: 2293 $ =~ /[\d.]+/g; our ($VERSION) = q$Revision: 2293 $ =~ /^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 base '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: 2293 $)[1] / 1000); use version; our $VERSION = version->new('1.23'); #----------------------------------------------------------------------------- ############################################################################## # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/ValuesAndExpressions/ProhibitMagicNumbers.run $ # $Date: 2008-05-04 12:18:31 -0500 (Sun, 04 May 2008) $ # $Author: clonezone $ # $Revision: 2293 $ ############################################################################## # 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 :