3 use vars qw( $CGI::Q $CGI::Fast::Ext_Request );
9 # unshift, don't assign, so FCGI can be found if it's installed
10 # unlikely, but possible
11 unshift @INC, '../lib';
14 eval { require FCGI };
18 use Test::More tests => 7;
21 skip( 'FCGI not installed, cannot continue', 7 ) unless $fcgi;
24 ok( my $q = CGI::Fast->new(), 'created new CGI::Fast object' );
25 is( $q, $CGI::Q, 'checking to see if the object was stored properly' );
26 is( $q->param(), (), 'no params' );
28 ok( $q = CGI::Fast->new({ foo => 'bar' }), 'creating obect with params' );
29 is( $q->param('foo'), 'bar', 'checking passed param' );
31 # if this is false, the package var will be empty
32 $ENV{FCGI_SOCKET_PATH} = 0;
33 is( $CGI::Fast::Ext_Request, '', 'checking no active request' );