NAME

spkg - Create Perl packages for HTML files for HTML::Seamstress manipulation

SYNOPSIS

spkg [options] html_file

OPTIONS

  • base_pkg_root $base_pkg_root

    The directory to add to @INC so that base_pkg is found

  • base_pkg $base_pkg

    The base package containing a method comp_root which returns the absolute path to the HTML file to be processed.

    This package must be on @INC and it's up to you to put it there :)

    Most commonly, you will have a directory layout like this:

    /home/metaperl/perl/src/seamstress/ctb:
    total 92
    drwxr-xr-x   5 metaperl metaperl 4096 Oct 31 03:46 .
    drwxr-xr-x  10 metaperl metaperl 4096 Sep 22 01:52 ..
    drwxr-xr-x   4 metaperl metaperl 4096 Oct 31 03:45 HTML
    drwxr-xr-x   4 metaperl metaperl 4096 Sep 21 00:33 html
    
    
    /home/metaperl/perl/src/seamstress/ctb/HTML:
    total 16
    drwxr-xr-x  4 metaperl metaperl 4096 Oct 31 03:45 .
    drwxr-xr-x  5 metaperl metaperl 4096 Oct 31 03:46 ..
    drwxr-xr-x  3 metaperl metaperl 4096 Oct 31 03:45 Seamstress
    
    /home/metaperl/perl/src/seamstress/ctb/HTML/Seamstress:
    total 20
    drwxr-xr-x  3 metaperl metaperl 4096 Oct 31 03:45 .
    drwxr-xr-x  4 metaperl metaperl 4096 Oct 31 03:45 ..
    -rw-r--r--  1 metaperl metaperl   95 Oct 31 03:17 Base.pm
    
    /home/metaperl/perl/src/seamstress/ctb/html:
    total 32
    drwxr-xr-x  4 metaperl metaperl 4096 Sep 21 00:33 .
    drwxr-xr-x  5 metaperl metaperl 4096 Oct 31 03:46 ..
    -rw-r--r--  1 metaperl metaperl  246 Sep 21 00:30 hello_world.html
    -rw-r--r--  1 metaperl metaperl  818 Sep 21 00:30 hello_world.pm

    and you will call spkg like this:

    spkg --base HTML::Seamstress::Base html/hello_world.html

    Thus creating html::hello_world which you can use in your Perl programs by simply typing:

    require html::hello_world; html::hello_world->new;

    creating an HTML::TreeBuilder style tree for processing.

DESCRIPTION

Template and HTML::Mason both create objects which they configure with an INCLUDE_PATH or comp_root, respectively. Seamstress leverages Perl's standard include mechanism to find HTML files. As such, a c<base_pkg> with a method that will allow runtime requires of such packages is needed.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 214:

=back without =over