diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-04-08 01:20:00 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-06-28 22:41:55 +0200 |
commit | 541e2b41af8cc44ad3eb0638618bc457c666d612 (patch) | |
tree | 121866bb37e4b06ffd7320679772d77271158661 /t | |
parent | cdc26a69674ea7a3413efce2f8d4e3225c6ab76e (diff) | |
download | bugzilla-541e2b41af8cc44ad3eb0638618bc457c666d612.tar.gz bugzilla-541e2b41af8cc44ad3eb0638618bc457c666d612.tar.xz |
a bit of a quantum leap
It's now possible to load the CGIs into a mojolicious controller.
Compatibility isn't 100% yet, but it should give a migration path
for any random CGI to become a proper controller.
Diffstat (limited to 't')
-rw-r--r-- | t/002goodperl.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/002goodperl.t b/t/002goodperl.t index 5f201160b..80d7cf2b9 100644 --- a/t/002goodperl.t +++ b/t/002goodperl.t @@ -83,6 +83,7 @@ foreach my $file (@testitems) { my $found_use_strict = 0; my $found_use_warnings = 0; my $found_modern_perl = 0; + my $found_mojo = 0; $file =~ s/\s.*$//; # nuke everything after the first space (#comment) next if (!$file); # skip null entries @@ -92,13 +93,17 @@ foreach my $file (@testitems) { } while (my $file_line = <FILE>) { $found_modern_perl = 1 if $file_line =~ m/^use\s*(?:Moo|Role::Tiny)/; + $found_mojo = 1 if $file_line =~ m/^use\s(?:Mojo(?:licious::Lite|::Base)\b)/; $found_use_perl = 1 if $file_line =~ m/^\s*use 5.10.1/; $found_use_strict = 1 if $file_line =~ m/^\s*use strict/; $found_use_warnings = 1 if $file_line =~ m/^\s*use warnings/; - if ($found_modern_perl) { + if ($found_modern_perl || $found_mojo) { $found_use_strict = 1; $found_use_warnings = 1; } + if ($found_mojo) { + $found_use_perl = 1; + } last if ($found_use_perl && $found_use_strict && $found_use_warnings); } close (FILE); |