Dancer::Plugin::FakeCGI - run CGI methods or Perl-files under Dancer
Supports to run CGI perl files on CGI methods under Dancer.
plugins: FakeCGI: cgi-dir: 'cgi-bin' cgi-package: 'lib/CGI'
cgi-dir
cgi-package
Emulation of this CGI methods: header(), cookie()
Array of Hashref of methods which will be mocked.
CGI
Standart of method which we automatically mocked is CGI->header.
Method for runned specified CGI method-function and return values of runned function.
Method for runned specified Perl CGI file and returned exit value
Load packages into memory or Compiled files into memory
Return handle of IO::Capture or undef, if not initialized
This plugin uses Dancer's hooks support to allow you to register code that should execute at given times.
In both functions was as first arguments reference to IO::Capture::Stdout
IO::Capture::Stdout
hook 'fake_cgi_before' => sub { my $capture = shift; # do something with the new DB handle here };
Igor Bujna, <igor.bujna@post.cz>
<igor.bujna@post.cz>
Copyright 2010-12 Igor Bujna.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Dancer
CGI::Compile
Test::TinyMocker
To install Dancer::Plugin::FakeCGI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer::Plugin::FakeCGI
CPAN shell
perl -MCPAN -e shell install Dancer::Plugin::FakeCGI
For more information on module installation, please visit the detailed CPAN module installation guide.