Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 19. máj 2025

Súbor: [Platon] / scripts / perl / accounting / modules / templates.pm (stiahnutie)

Revízia 1.1, Tue Mar 15 23:17:56 2005 UTC (20 years, 2 months ago) by rajo

Modules for accounting scripts.

#
# modules/templates.pm
#
# Developed by Lubomir Host 'rajo' <rajo AT platon.sk>
# Copyright (c) 2005 Platon SDG, http://platon.sk/
# Licensed under terms of GNU General Public License.
# All rights reserved.
#
# Changelog:
# 2005-03-14 - created
#

# $Platon$

package templates;

use strict;
use Carp;
use English;
use Template::Namespace::Constants;

use config;

use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);

use base qw( Template );
use vars qw( $VERSION $DEBUG );

$VERSION  = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
$DEBUG    = 0 unless defined $DEBUG;

sub new
{ #{{{
    my $this  = shift;
    my $class = ref($this) || $this;
    my $config = shift;

    my $self  = Template->new({
            AUTHOR            => 'Ľubomír Host (rajo)',
            INCLUDE_PATH    => [ @_, './templates' ],
            RELATIVE        => 1,
            PRE_PROCESS        => 'http-header.tt2',
            COMPILE_DIR        => "/tmp/rajo-ttc-$EUID",
            NAMESPACE        => {
                author    => Template::Namespace::Constants->new({
                        name    => 'Ľubomír Host (rajo)',
                        email    => '<rajo@platon.sk>',
                        callto    => 'rajo207',
                        icq        => 257322664,
                    }),
                const    => Template::Namespace::Constants->new({
                        fastcgi_name    => $config->fastcgi_name(),
                        site_title        => $config->site_title(),
                        site_base        => $config->site_base(),
                        site_base_uri    => $config->site_base_uri(),
                        admin_base_uri    => $config->admin_base_uri(),
                    }),
            },
            PLUGIN_BASE        => 'Platon::Template::Plugin',
            PLUGINS            => {
                lang        => 'lang',
                obfuscator    => 'obfuscator',
                myurl        => 'myurl',
            },
            VARIABLES        => {
                conf        => $config,
                env            => \%ENV,
            }
        });

    bless $self, $class;

    return $self;
} # }}}

1;

__END__

=head1 NAME

templates - <<<description of module>>>

=head1 SYNOPSIS

  use templates;

  my $xxx = new templates;

=head1 DESCRIPTION

The templates module allows you ...
<<<your description here>>>

=head2 EXPORT

<<here describe exported methods>>>

=head1 SEE ALSO

=head1 AUTHORS

Lubomir Host 'rajo', <rajo AT platon.sk>

=cut

# vim: ts=4
# vim600: fdm=marker fdl=0 fdc=3


Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok