MKDoc::Core::Init::Petal - Initializes Petal base directories.


MKDoc-Core documentation Contained in the MKDoc-Core distribution.

Index


Code Index:

NAME

Top

MKDoc::Core::Init::Petal - Initializes Petal base directories.

AUTHOR

Top

Copyright 2003 - MKDoc Holdings Ltd.

Author: Jean-Michel Hiver

This module is free software and is distributed under the same license as Perl itself. Use it at your own risk.

SEE ALSO

Top

  L<Petal> TAL for perl
  MKDoc: http://www.mkdoc.com/

Help us open-source MKDoc. Join the mkdoc-modules mailing list:

  mkdoc-modules@lists.webarch.co.uk



MKDoc-Core documentation Contained in the MKDoc-Core distribution.

package MKDoc::Core::Init::Petal;
use warnings;
use strict;
use Petal;


sub init
{
    $Petal::DECODE_CHARSET = 'utf8';
    $Petal::ENCODE_CHARSET = 'utf8';
    $Petal::BASE_DIR = undef;

    @Petal::BASE_DIR = map { -d $_ ? $_ : () } (
        $ENV{SITE_DIR}  . '/resources/templates',
        $ENV{MKDOC_DIR} . '/resources/templates',
        (map { "$_/MKDoc/resources/templates" } @INC ),
    );
}


1;


__END__