[Dancer-users] New plugin Dancer-Plugin-FakeCGI

sawyer x xsawyerx at gmail.com
Fri Sep 28 17:25:32 CEST 2012


This is awesome!

This could be part (or the center) of a tutorial on moving away from CGI in
corporate environments.

On Thu, Sep 27, 2012 at 12:47 PM, <igor.bujna at post.cz> wrote:

> Hi everybody,
> let mi introduce my new plugin
> http://search.cpan.org/~koceasy/Dancer-Plugin-FakeCGI-0.21/.
> This plugin can easily run CGI methods or Perl CGI files under Dancer such
> as this simple example:
>
> # Run specified method in given package
>
> any '/test_1'
>  => sub {
>     fake_cgi_method("test_CGI", "test");
>     fake_cgi_as_string;
> };
> # Run specified Perl file
> any '/test_3' => sub {
>     fake_cgi_file("test_CGI_file.pl");
>     fake_cgi_as_string;
> };
>
> This example is append in this plugin in directory examples.
> I wrote this plugin to easily move CGI script to use in Dancer. The idea
> is similar as running CGI under mod_perl. Than every package is after first
> run cached in memory or can be cached with method fake_cgi_compile.
> In next version i want to add emulation CGI function header() and
> cookie(). If someone know how can be easily implemented, than send me email.
> In future i would like to extend IO::Capture(such as not save some
> captured text.... )
>
> Bye Igor
>
>
>
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20120928/9a582271/attachment.htm>


More information about the Dancer-users mailing list