CGI-FormMagick
view release on metacpan or search on metacpan
lib/CGI/FormMagick/TagMaker.pm view on Meta::CPAN
ok(0, "Fake test just to keep 'make test' happy");
}
=cut
# Names of properties for objects of this class are declared here:
my $KEY_AUTO_GROUP = 'auto_group'; # do we make tag groups by default?
my $KEY_AUTO_POSIT = 'auto_posit'; # with methods whose parameters
# could be either named or positional, when we aren't sure what we
# are given, do we guess positional? Default is named.
# These extra tag properties work only with AUTOLOAD:
my $PARAM_TEXT = 'text'; #tag pair is wrapped around this
my $PARAM_LIST = 'list'; #force tag groups to be returned in ARRAY ref
# Constant values used in this class go here:
my $TAG_GROUP = 'group'; # values that "what_to_make" can have
my $TAG_PAIR = 'pair';
my $TAG_START = 'start';
lib/CGI/FormMagick/TagMaker.pm view on Meta::CPAN
$self->{$KEY_AUTO_POSIT} = 0;
return( $self );
}
=head2 groups_by_default([ VALUE ])
This method is an accessor for the boolean "automatic grouping" property of this
object, which it returns. If VALUE is defined, this property is set to it. In
cases where we aren't told explicitely that autoloaded methods are making a
single or multiple tags (using ['_start', '_end', '_pair'] and '_group'
respectively), we look to this property to determine what operation we guess.
The default is "single". When this property is true, we can make both single and
groups of tags by using a suffix-less method name; however, making single tags
this way is slower than when this property is false. Also, be aware that when we
are making a "group", arguments that are ARRAY refs are always flattened, and
when we are making a "single", ARRAY ref arguments are always used literally.
=cut
sub groups_by_default {
my $self = shift( @_ );
lib/CGI/FormMagick/TagMaker.pm view on Meta::CPAN
$self->{$KEY_AUTO_GROUP} = $new_value;
}
return( $self->{$KEY_AUTO_GROUP} );
}
=head2 positional_by_default([ VALUE ])
This method is an accessor for the boolean "positional arguments" property of
this object, which it returns. If VALUE is defined, this property is set to it.
With methods whose parameters could be either named or positional, when we aren't
sure what we are given, do we guess positional? Default is named.
=cut
sub positional_by_default {
my $self = shift( @_ );
if( defined( my $new_value = shift( @_ ) ) ) {
$self->{$KEY_AUTO_POSIT} = $new_value;
}
return( $self->{$KEY_AUTO_POSIT} );
}
( run in 1.152 second using v1.01-cache-2.11-cpan-748bfb374f4 )