-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 73226ad8b5d36749f197581754be862506810325 Author: Lee Johnson <[email protected]> Date: Sun Mar 8 16:59:09 2015 +0100 ref #11, #12 - perldoc and testing tweaks make it clear that CGI::Fast can be a drop in replacement for CGI but if using it with an explicit call to use CGI then the call to use CGI must happen after the call to use CGI::Fast to prevent any CGI import pragmas being overwritten commit dcdec7d Author: Lee Johnson <[email protected]> Date: Sun Mar 8 10:05:18 2015 +0100 ref #12 - failing test case load order of CGI and CGI::Fast can cause import pragmas in CGI to be overwritten, which is probably not good behaviour. bisect shows this was introduced in 53651f2. the fix maybe just do document this behaviour given its age squash this commit with the fix (or remove the test if the fix is just documentation)
- Loading branch information
Showing
5 changed files
with
84 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
# the order is important! (see GH #12) | ||
use CGI::Fast; | ||
use CGI qw/ :standard -no_xhtml -nosticky /; | ||
use Test::More qw/ no_plan /; | ||
|
||
my $q = CGI::Fast->new; | ||
|
||
my $start_html = start_html(); | ||
unlike( $start_html,qr/XHTML/,'CGI pragma not overriden by CGI::Fast' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use Test::More; | ||
use CGI::Fast qw/ :standard /; | ||
|
||
my $cgi_version = $CGI::VERSION; | ||
|
||
if ( ! $cgi_version ) { | ||
plan skip_all => "Couldn't figure out CGI version"; | ||
} else { | ||
$cgi_version =~ s/\D.*$//; | ||
} | ||
|
||
if ( $cgi_version < 4.14 ) { | ||
plan skip_all => "CGI v4.14+ required for this test"; | ||
} | ||
|
||
eval { cgi_error() }; | ||
ok( ! $@,'imports' ); | ||
$@ && diag( $@ ); | ||
|
||
done_testing(); |