Vincenzo Zocca > PerlBean-1.0 > PerlBean::Style

Download:
PerlBean-1.0.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.0   Source  

NAME ^

PerlBean::Style - contains PerlBean code style information

SYNOPSIS ^

 TODO

ABSTRACT ^

PerlBean code style information

DESCRIPTION ^

PerlBean::Style class for code generation style

EXPORT ^

By default nothing is exported.

codegen

This tag contains variables useful for the actual code generation. You should not need to use this tag.

$AC

The value which would be obtained through the singleton object's get_str_after_comma() method.

$ACS

The value which would be obtained through the singleton object's get_str_around_complex_subscripts() method.

$AN2MBF

The value which would be obtained through the singleton object's get_method_factory_name_to_method_base_filter() method.

$AO

The value which would be obtained through the singleton object's get_str_around_operators() method.

$BCP

The value which would be obtained through the singleton object's get_str_between_conditional_and_parenthesis() method.

$BFP

The value which would be obtained through the singleton object's get_str_between_function_and_parenthesis() method.

$IND

The value which would be obtained through the singleton object's get_indent() method.

$MOF

The value which would be obtained through the singleton object's get_method_operation_filter() method.

@PBCC

The values which would be obtained through the singleton object's get_str_post_block_close_curl() method and the replacement of __IND_BLOCK__ with the correct indentation. The ARRAY's index is the level of indentation. 10(!) levels of indentation are available.

@PBOC

The values which would be obtained through the singleton object's get_str_pre_block_open_curl() method and the replacement of __IND_BLOCK__ with the correct indentation. The ARRAY's index is the level of indentation. 10(!) levels of indentation are available.

CONSTRUCTOR ^

new( [ OPT_HASH_REF ] )

Creates a new PerlBean::Style object. OPT_HASH_REF is a hash reference used to pass initialization options. On error an exception Error::Simple is thrown.

Options for OPT_HASH_REF may include:

indent

Passed to set_indent(). Defaults to ' '.

method_factory_name_to_method_base_filter

Passed to set_method_factory_name_to_method_base_filter(). Defaults to \&default_method_factory_name_to_method_base_filter.

method_operation_filter

Passed to set_method_operation_filter(). Defaults to \&default_method_operation_filter.

str_after_comma

Passed to set_str_after_comma(). Defaults to ' '.

str_around_complex_subscripts

Passed to set_str_around_complex_subscripts(). Defaults to ' '.

str_around_operators

Passed to set_str_around_operators(). Defaults to ' '.

str_between_conditional_and_parenthesis

Passed to set_str_between_conditional_and_parenthesis(). Defaults to ' '.

str_between_function_and_parenthesis

Passed to set_str_between_function_and_parenthesis(). Defaults to ''.

str_post_block_close_curl

Passed to set_str_post_block_close_curl(). Defaults to "\n__IND_BLOCK__".

str_pre_block_open_curl

Passed to set_str_pre_block_open_curl(). Defaults to ' '.

METHODS ^

default_method_factory_name_to_method_base_filter(ATTRIBUTE)

Class method. Default attribute name to method filter. ATTRIBUTE is the attribute name. This method adds a _ character to ATTRIBUTE and returns it.

default_method_operation_filter(OPERATION)

Class method. Default method operation filter. OPERATION is the operation name. This method plainly returns the OPERATION.

get_indent()

Returns the string used for ONE indentation.

get_method_factory_name_to_method_base_filter()

Returns the subroutine that converts an attribute name to the method base.

get_method_operation_filter()

Returns the subroutine that formats the method operation.

get_str_after_comma()

Returns the string after each comma.

get_str_around_complex_subscripts()

Returns the string around "complex" subscripts(inside brackets).

get_str_around_operators()

Returns the string around most operators.

get_str_between_conditional_and_parenthesis()

Returns the string between conditionals (for, if, while...) and parenthesis.

get_str_between_function_and_parenthesis()

Returns the string between function name and its opening parenthesis.

get_str_post_block_close_curl()

Returns the string printed after the closing curly of a multi-line BLOCK. Any string __IND_BLOCK__ in the value is replaced with the correct block indentation.

get_str_pre_block_open_curl()

Returns the string printed before the opening curly of a multi-line BLOCK. Any string __IND_BLOCK__ in the value is replaced with the correct block indentation.

instance( [ CONSTR_OPT ] )

Always returns the same PerlBean::Style -singleton- object instance. The first time it is called, parameters CONSTR_OPT -if specified- are passed to the constructor.

set_indent(VALUE)

Set the string used for ONE indentation. VALUE is the value. Default value at initialization is ' '. On error an exception Error::Simple is thrown.

VALUE must match regular expression:
.*
set_method_factory_name_to_method_base_filter(VALUE)

Set the subroutine that converts an attribute name to the method base. VALUE is the value. Default value at initialization is \&default_method_factory_name_to_method_base_filter. On error an exception Error::Simple is thrown.

VALUE must be a reference of:
CODE
set_method_operation_filter(VALUE)

Set the subroutine that formats the method operation. VALUE is the value. Default value at initialization is \&default_method_operation_filter. On error an exception Error::Simple is thrown.

VALUE must be a reference of:
CODE
set_str_after_comma(VALUE)

Set the string after each comma. VALUE is the value. Default value at initialization is ' '. On error an exception Error::Simple is thrown.

VALUE must match regular expression:
.*
set_str_around_complex_subscripts(VALUE)

Set the string around "complex" subscripts(inside brackets). VALUE is the value. Default value at initialization is ' '. On error an exception Error::Simple is thrown.

VALUE must match regular expression:
.*
set_str_around_operators(VALUE)

Set the string around most operators. VALUE is the value. Default value at initialization is ' '. On error an exception Error::Simple is thrown.

VALUE must match regular expression:
.*
set_str_between_conditional_and_parenthesis(VALUE)

Set the string between conditionals (for, if, while...) and parenthesis. VALUE is the value. Default value at initialization is ' '. On error an exception Error::Simple is thrown.

VALUE must match regular expression:
.*
set_str_between_function_and_parenthesis(VALUE)

Set the string between function name and its opening parenthesis. VALUE is the value. Default value at initialization is ''. On error an exception Error::Simple is thrown.

VALUE must match regular expression:
.*
set_str_post_block_close_curl(VALUE)

Set the string printed after the closing curly of a multi-line BLOCK. Any string __IND_BLOCK__ in the value is replaced with the correct block indentation. VALUE is the value. Default value at initialization is "\n__IND_BLOCK__". On error an exception Error::Simple is thrown.

VALUE must match regular expression:
.*
set_str_pre_block_open_curl(VALUE)

Set the string printed before the opening curly of a multi-line BLOCK. Any string __IND_BLOCK__ in the value is replaced with the correct block indentation. VALUE is the value. Default value at initialization is ' '. On error an exception Error::Simple is thrown.

VALUE must match regular expression:
.*

SEE ALSO ^

PerlBean, PerlBean::Attribute, PerlBean::Attribute::Boolean, PerlBean::Attribute::Factory, PerlBean::Attribute::Multi, PerlBean::Attribute::Multi::Ordered, PerlBean::Attribute::Multi::Unique, PerlBean::Attribute::Multi::Unique::Associative, PerlBean::Attribute::Multi::Unique::Associative::MethodKey, PerlBean::Attribute::Multi::Unique::Ordered, PerlBean::Attribute::Single, PerlBean::Collection, PerlBean::Dependency, PerlBean::Dependency::Import, PerlBean::Dependency::Require, PerlBean::Dependency::Use, PerlBean::Described, PerlBean::Described::ExportTag, PerlBean::Method, PerlBean::Method::Constructor, PerlBean::Method::Factory, PerlBean::Symbol

BUGS ^

None known (yet.)

HISTORY ^

First development: January 2003 Last update: September 2003

AUTHOR ^

Vincenzo Zocca

COPYRIGHT ^

Copyright 2003 by Vincenzo Zocca

LICENSE ^

This file is part of the PerlBean module hierarchy for Perl by Vincenzo Zocca.

The PerlBean module hierarchy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

The PerlBean module hierarchy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the PerlBean module hierarchy; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

syntax highlighting: