Carrot
view release on metacpan or search on metacpan
lib/Carrot/Meta/Greenhouse/Dot_Ini/Line.pm view on Meta::CPAN
package Carrot::Meta::Greenhouse::Dot_Ini::Line
# /type class
# /capability "Recognition of line patterns in .ini files"
{
use strict;
use warnings 'FATAL' => 'all';
BEGIN {
require('Carrot/Meta/Greenhouse/Dot_Ini/Line./manual_modularity.pl');
} #BEGIN
Carrot::Meta::Greenhouse::Package_Loader::provide(
my $pkg_hierarchy_class = '::Modularity::Package::Expander::Hierarchy',
my $pkg_level_class = '::Modularity::Package::Expander::Level');
Carrot::Meta::Greenhouse::Package_Loader::provide_instance(
my $package_resolver = '::Modularity::Package::Resolver');
$package_resolver->provide(
my $package_name_class = '::Modularity::Package::Name',
'::Personality::Valued::File::Name::Type::',
my $directory_class = '::Directory',
my $filter_extension_class = '::Directory::Filter::Extension',
my $file_name_class = '::Regular::Content::UTF8_wBOM');
$package_resolver->provide_instance(
my $passage_counter = '::Meta::Greenhouse::Passage_Counter');
# =--------------------------------------------------------------------------= #
sub is_indented
# /type method
# /effect "Tests whether the line is intended"
# //parameters
# //returns
# ::Personality::Abstract::Boolean
{
return(${$_[THIS]} =~ m{\A\h+(.*)\z});
}
sub is_section_name
# /type method
# /effect "Tests whether the line is a section name"
# //parameters
# //returns
# ::Personality::Abstract::Boolean
{
if (${$_[THIS]} =~ m{\A\[(.*)\]\z})
{
return($package_name_class->indirect_constructor($1));
} else {
return(IS_UNDEFINED);
}
}
sub is_association
# /type method
# /effect "Tests whether the line is an association"
# //parameters
# //returns
# ::Personality::Abstract::Boolean
{
return(${$_[THIS]} =~ m{\A(.+?)\h+=>\h+(.+)\z});
}
sub is_separated_values
# /type method
# /effect "Tests whether the line is a list of separated values"
# //parameters
# //returns
# ::Personality::Abstract::Boolean
{
my @values = (${$_[THIS]} =~ m{(\H+)}sg);
if (@values < 2)
{
return(IS_UNDEFINED);
} else {
return(\@values);
}
}
sub is_directory
# /type method
# /effect "Tests whether the line is a directory name"
# //parameters
( run in 0.340 second using v1.01-cache-2.11-cpan-aadc1410aed )