Thomas Wittek > Konstrukt > Konstrukt::Plugin::perlvar

Download:
konstrukt/Konstrukt-0.5-beta13.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Konstrukt::Plugin::perlvar - Access to Perl variables

SYNOPSIS ^

Usage:

        <!-- set value -->
        <& perlvar var="$Foo::Bar" set="baz" / &>
        
        <!-- print out value -->
        <& perlvar var="$Foo::Bar" / &>
        <& perlvar var="undef" &>this default will be used<& / &>

        <!-- unset value -->
        <& perlvar var="$Foo::Bar" unset="1" / &>

Result:

        <!-- set value -->
        
        <!-- print out value -->
        baz
        this default will be used
        
        <!-- unset value -->

DESCRIPTION ^

Plugin to support access to variables.

In fact the statement in the var-attribute is eval'ed. so when using it without set, the return value of any perl statement will be returned. Use it with care!

METHODS ^

prepare

The date is a very volatile data. We don't want to cache it...

Parameters:

execute

Checks the passed tag for attributes like var="varname" and set="value".

With only var being passed, the value of the will be put out.

With additionaly set being passed, the according value of the variable will be changed and nothing will be put out.

Parameters:

AUTHOR ^

Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.

This document is free software. It is distributed under the same terms as Perl itself.

SEE ALSO ^

Konstrukt::Plugin, Konstrukt

syntax highlighting: