The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Devel::Pillbug - Instant HTML::Mason server for dev environments

SYNOPSIS

Install Devel::Pillbug:

  > perl -MCPAN -e 'install Devel::Pillbug';

Start Devel::Pillbug:

  > pillbug;

All arguments are optional:

  > pillbug -host example.com -port 8080 -docroot /tmp/foo

Do it in Perl:

  use Devel::Pillbug;

  my $port = 8000; # Optional argument, default is 8080

  my $server = Devel::Pillbug->new($port);

  #
  # Optional: Use methods from HTTP::Server::Simple
  #
  # $server->host("example.com");

  #
  # Optional: Override the document root
  #
  # $server->docroot("/tmp/foo");

  $server->run;

DESCRIPTION

Devel::Pillbug is a simple HTML::Mason server for dev environments.

It is designed for zero configuration and easy install from CPAN.

Devel::Pillbug uses the "public_html" or "Sites" directory of the user who launched the process for its document root. Files ending in "html" are treated as Mason components.

METHODS

See HTTP::Server::Simple and HTTP::Server::Simple::Mason for inherited methods.

  • $self->docroot($docroot);

    Returns the currently active docroot.

    The server will set its docroot to the received path, if one is supplied as an argument.

CONFIGURATION AND ENVIRONMENT

The document root must exist and be readable, and Devel::Pillbug must be able to bind to its listen port (default 8080).

VERSION

This document is for version .004 of Devel::Pillbug.

AUTHOR

Alex Ayars <pause@nodekit.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009, Alex Ayars <pause@nodekit.org>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0 or later. See: http://dev.perl.org/licenses/

SEE ALSO

File::HomeDir, File::Type, Net::Server::PreFork.

This module extends HTTP::Server::Simple::Mason.