Carrot

 view release on metacpan or  search on metacpan

lib/Carrot/Individuality/Controlled/Customized_Settings.pm  view on Meta::CPAN

	use warnings 'FATAL' => 'all';

	Carrot::Meta::Greenhouse::Package_Loader::provide_instance(
		my $compilation_name = '::Meta::Greenhouse::Compilation_Name');

	my $expressiveness = Carrot::individuality;
	$expressiveness->package_resolver->provide(
		my $dot_ini_class = '::Meta::Greenhouse::Dot_Ini',
		my $inheritance_class = '::Modularity::Object::Inheritance::ISA_Occupancy',
		'::Personality::',
			my $cursor_class = '::Reflective::Iterate::Array::Cursor',
			my $search_path_class = '::Valued::File::Name::Type::Directory::Search_Path',
		my $line_class = '[=this_pkg=]::Dot_Cfg::Line',
	);
	$expressiveness->package_resolver->provide_name_only(
		my $monad_class = '[=this_pkg=]::Monad');
	$expressiveness->package_resolver->provide_instance(
		my $pkg_patterns = '::Modularity::Package::Patterns');

	$expressiveness->declare_provider;

lib/Carrot/Individuality/Controlled/Customized_Settings.pm  view on Meta::CPAN

sub add_any_config
# /type method
# /effect ""
# //parameters
#	file_name       ::Personality::Valued::File::Name
# //returns
{
	my ($this, $file_name) = @ARGUMENTS;

	my $line = $line_class->indirect_constructor;
	my $cursor = $cursor_class->indirect_constructor(
		$file_name->read_lines,
		$line);
	my $section = [];
	my $name = IS_UNDEFINED;
	my $config = $this->[ATR_CONFIG];
	while ($cursor->advance)
	{
		if ($line->is_comment_or_empty)
		{
			next;

		} elsif (my ($text) = $line->is_section)
		{
			if (defined($name))
			{
				$config->{$name} = $section;

lib/Carrot/Individuality/Controlled/Customized_Settings/Dot_Cdf.pm  view on Meta::CPAN

	my $expressiveness = Carrot::individuality;
	$expressiveness->provide(
		my $class_names = '::Individuality::Controlled::Class_Names');

	$class_names->provide_instance(
		my $translated_errors = '::Meta::Greenhouse::Translated_Errors');

	$class_names->provide(
		'::Personality::',
			my $eval_error_class = '::Valued::Perl5::Eval_Error',
			my $cursor_class = '::Reflective::Iterate::Array::Cursor',

		my $line_class = '[=this_pkg=]::Line',
		my $source_class = '[=project_pkg=]::Source::Here::Plain',

		'[=project_pkg=]::Definition::',
			my $flat_definition_class = '::Flat',
			my $list_definition_class = '::List',
			my $table_definition_class = '::Table');

	#my $dot_cdf_magic = q{=customized_settings;standard;v1};

lib/Carrot/Individuality/Controlled/Customized_Settings/Dot_Cdf.pm  view on Meta::CPAN

# /type method
# /effect ""
# //parameters
#	values
#	buffer
# //returns
{
	my ($this, $values, $buffer) = @ARGUMENTS;

	my $line = $line_class->indirect_constructor;
	my $cursor = $cursor_class->indirect_constructor(
		[split(qr{(?:\012|\015\012?)}, $$buffer, PKY_SPLIT_IGNORE_EMPTY_TRAIL)],
		$line);

	my $anchor1 = '::Individuality::Controlled::Customized_Settings';
	my $anchor2 = '::Personality';
	my ($name, $definition, $source);
	my ($keyword, $text);
	while ($cursor->advance)
	{
		if ($line->is_comment_or_empty)
		{
			next;

		} elsif (($text) = $line->is_name)
		{
			if (defined($definition))
			{
				$values->{$name} = $definition->implement;

lib/Carrot/Individuality/Controlled/Customized_Settings/Dot_Cdf.pm  view on Meta::CPAN

		} elsif (($text) = $line->is_anchor)
		{
			$anchor1 = $text;
			$anchor2 = $text;

		} else {
#FIXME: outdated
			$translated_errors->advocate(
				'invalid_definition_format',
				[$this->[ATR_FILE_NAME],
				$cursor->current_index,
				$$line]);

		}
	}

	if (defined($definition))
	{
		$values->{$name} = $definition->implement;
	}
#FIXME: add inheritance of default values if only default is given

lib/Carrot/Individuality/Controlled/Customized_Settings/Monad.pm  view on Meta::CPAN

	use strict;
	use warnings 'FATAL' => 'all';

	my $expressiveness = Carrot::individuality;
	$expressiveness->provide(
		'::Individuality::Controlled::',
			my $class_names = '::Class_Names',
			my $distinguished_exceptions = '::Distinguished_Exceptions');

	$class_names->provide(
		my $cursor_class = '::Personality::Reflective::Iterate::Array::Cursor',
		'[=project_pkg=]::',
			my $line_class = '::Dot_Cfg::Line',
			my $source_class = '::Source::Here::Plain',
			my $dot_cdf_class = '::Dot_Cdf');

	$class_names->provide_instance(
		my $writable_overlay = '::Meta::Greenhouse::Writable_Overlay',
		my $compilation_name = '::Meta::Greenhouse::Compilation_Name');

	$distinguished_exceptions->provide(

lib/Carrot/Individuality/Controlled/Customized_Settings/Monad.pm  view on Meta::CPAN

sub customize_by_arrayref
# /type method
# /effect ""
# //parameters
#	lines
# //returns
{
	my ($this, $lines) = @ARGUMENTS;

	my $line = $line_class->indirect_constructor;
	my $cursor = $cursor_class->indirect_constructor($lines, $line);

	my $count = 0;
	my ($setting, $source);
	my $anchor1 = 'Carrot::Individuality::Controlled::Customized_Settings';
	while ($cursor->advance)
	{
		if ($line->is_comment_or_empty)
		{
			next;

		} elsif (my ($text) = $line->is_name)
		{
			if (defined($setting))
			{
				$setting->modify($source);

lib/Carrot/Individuality/Controlled/Customized_Settings/Structure/Table/Column_Types.pm  view on Meta::CPAN

{
	#FIXME: or ->clone_constructor ?
	return($_[THIS][ATR_CLASSES][$_[SPX_POSITION]]
		->process_clone($_[SPX_ELEMENT]));
}

sub check
# /type method
# /effect ""
# //parameters
#	cursor
#	line
# //returns
{
	my ($this, $cursor, $line) = @ARGUMENTS;

	my $column_names;
	while ($cursor->advance)
	{
		if ($line->is_end_head)
		{
			last;

		} elsif ($line->is_start_head)
		{
			next;
		}

lib/Carrot/Individuality/Controlled/Customized_Settings/Structure/Table/Format/Aggregated_MxOxN.pm  view on Meta::CPAN

		}
	}

	return;
}

sub parse_lines
# /type method
# /effect ""
# //parameters
#	cursor
#	line
# //returns
{
	my ($this, $cursor, $line) = @ARGUMENTS;

	my $one_xoxn = IS_UNDEFINED;
	my $oxn = IS_UNDEFINED;
	my $context = '';
	my ($type, $elements);
	while ($cursor->advance)
	{
		if ($line->is_end_body)
		{
			if (defined($one_xoxn))
			{
				$this->row_action($context, $one_xoxn);
			}
			last;

		} elsif ($line->is_cut)

lib/Carrot/Individuality/Controlled/Customized_Settings/Structure/Table/Format/Column_Types.pm  view on Meta::CPAN

{
	#FIXME: or ->clone_constructor ?
	return($_[THIS][ATR_CLASSES][$_[SPX_POSITION]]
		->process_clone($_[SPX_ELEMENT]));
}

sub check
# /type method
# /effect ""
# //parameters
#	cursor
#	line
# //returns
{
	my ($this, $cursor, $line) = @ARGUMENTS;

	my $column_names;
	while ($cursor->advance)
	{
		if ($line->is_end_head)
		{
			last;

		} elsif ($line->is_start_head)
		{
			next;
		}

lib/Carrot/Individuality/Controlled/Customized_Settings/Structure/Table/Format/Concise_MxN.pm  view on Meta::CPAN

		$this->unquote_element($flag, $element);
	}

	return;
}

sub parse_lines
# /type method
# /effect ""
# //parameters
#	cursor
#	line
# //returns
{
	my ($this, $cursor, $line) = @ARGUMENTS;

	while ($cursor->advance)
	{
		if ($line->is_end_body)
		{
			last;

		} elsif ($line->is_cut)
		{
			$this->drop_rows;
			next;
		}

lib/Carrot/Individuality/Controlled/Customized_Settings/Structure/Table/Format/Concise_MxN/Unique.pm  view on Meta::CPAN

	{
		return(join(chr(1), %s));
	} else {
		return(join(chr(1), %s));
	}
}};
sub parse_lines
# /type method
# /effect ""
# //parameters
#	cursor
#	line
# //returns
{
	my ($this, $cursor, $line) = @ARGUMENTS;

	my $column_index = $this->[ATR_COLUMNS]->names->full_index;

	my $index_positions = [];
	foreach my $name (@{$this->[ATR_INDEX_COLUMNS]})
	{
		push($index_positions, $column_index->{$name});
	}

	my $key_creator = sprintf($key_creator_code,
		join(', ', map("\$_[1][$_]->value", @$index_positions)),
		join(', ', map("\$_[1][$_]", @$index_positions)));
	$code_evaluation->provide_fatally($key_creator);
	$this->[ATR_INDEX_KEY_CREATOR] = $key_creator;

	$this->superseded($cursor, $line);

	return;
}

sub inherit
# /type method
# /effect ""
# //parameters
#	that            ::Personality::Abstract::Instance
# //returns

lib/Carrot/Individuality/Controlled/Customized_Settings/Structure/Table/Format/Multiline_MxN.pm  view on Meta::CPAN

		$row->[$i] = $this->unquote_multiline_element($row->[$i], $i);
	}

	return;
}

sub parse_lines
# /type method
# /effect ""
# //parameters
#	cursor
#	line
# //returns
{
	my ($this, $cursor, $line) = @ARGUMENTS;

	my $full = IS_UNDEFINED;
	my $context = '';
	while ($cursor->advance)
	{
		if ($line->is_end_body)
		{
			if (defined($full))
			{
				$this->row_action($context, $full);
			}
			last;

		} elsif ($line->is_cut)

lib/Carrot/Individuality/Controlled/Customized_Settings/Structure/Table/Format/_Corporate.pm  view on Meta::CPAN

	use strict;
	use warnings 'FATAL' => 'all';
	use bytes;

	my $expressiveness = Carrot::individuality;
	$expressiveness->package_resolver->provide_instance(
		my $re_english = '::Diversity::English::Regular_Expression');
	$expressiveness->package_resolver->provide(
		my $columns_class = '[=project_pkg=]::Table::Column_Types',
		'::Personality::',
			my $cursor_class = '::Reflective::Iterate::Array::Cursor',
			my $file_name_class = '::Valued::File::Name::Type::Regular::Content::UTF8_wBOM');

	# $expressiveness->provide(
	# 	my $distinguished_exceptions =
	# 		'::Individuality::Controlled::Distinguished_Exceptions');
	#
	# $distinguished_exceptions->provide(
	# 	my $table_already_initialized = 'table_already_initialized');

	my $first_char_re = $re_english->compile(

lib/Carrot/Individuality/Controlled/Customized_Settings/Structure/Table/Format/_Corporate.pm  view on Meta::CPAN

# /effect ""
# /alias_name modify
# //parameters
#	source
# //returns
{
	my ($this, $source) = @ARGUMENTS;

#	$this->detabify($lines);
	my $line = $this->table_line_constructor($source->first_element);
	$source->re_constructor($cursor_class->value, $line);

	$this->[ATR_COLUMNS]->check($source, $line);
	$this->parse_lines($source, $line);

	return;
}
#*modify = \&initialize;

# =--------------------------------------------------------------------------= #

lib/Carrot/Meta/Greenhouse/Dot_Ini.pm  view on Meta::CPAN

	} #BEGIN

	Carrot::Meta::Greenhouse::Package_Loader::provide_instance(
		my $package_resolver = '::Modularity::Package::Resolver');

	$package_resolver->provide(
		my $package_name_class = '::Modularity::Package::Name',
		my $file_name_class = '::Personality::Valued::File::Name::Type::Regular::Content::UTF8_wBOM',
		my $directory_name_class = '::Personality::Valued::File::Name::Type::Directory',
		my $line_class = 'Carrot::Meta::Greenhouse::Dot_Ini::Line',
		my $cursor_class = '::Personality::Reflective::Iterate::Array::Cursor');

	$package_resolver->provide_instance(
		my $pkg_patterns = '::Modularity::Package::Patterns',
		my $compilation_name = '::Meta::Greenhouse::Compilation_Name',
		my $translated_errors = '::Meta::Greenhouse::Translated_Errors',
		my $application_directories = '::Meta::Greenhouse::Application_Directories',
		my $passage_counter = '::Meta::Greenhouse::Passage_Counter',
		my $search_path = '::Personality::Valued::File::Name::Type::Directory::Search_Path');


lib/Carrot/Meta/Greenhouse/Dot_Ini.pm  view on Meta::CPAN

sub process_lines
# /type method
# /effect "Processes given lines"
# //parameters
#	lines
# //returns
{
	my ($this, $lines) = @ARGUMENTS;

	my $line = $line_class->indirect_constructor;
	my $cursor = $cursor_class->indirect_constructor($lines, $line);

	my $subject = $this->[ATR_SUBJECT];
	my $section = [];
	my $pkg_name = '';
	my $text;
	while ($cursor->advance)
	{
		$$line =~ s{\h+\z}{}saa; #FIXME: hardcoded
		next if ($line->is_comment_or_blank);

		if (($text) = $line->is_indented)
		{
			push($section, $text);

		} elsif (my $section_name = $line->is_section_name)
		{
			$subject->dot_ini_got_section(
				$pkg_name,
				$section);
			$section = [];
			$section_name->qualify('Carrot');
			$pkg_name = $section_name->value;

		} elsif (my $directory_content = $line->is_directory_content)
		{
			my $file_name = $file_name_class->indirect_constructor;
			my $cursor = $cursor_class->indirect_constructor(
				$directory_content->list_qualified,
				$file_name);
			while ($cursor->advance)
			{
				$this->process_file($file_name);
			}

		} elsif (my $ini_file = $line->is_ini_file)
		{
			$application_directories->resolve_placeholders($ini_file);
			$this->process_file($ini_file);

#		} elsif (my $ini_package = $line->is_ini_package)

lib/Carrot/Meta/Greenhouse/Dot_Ini.pm  view on Meta::CPAN

sub process_section
# /type method
# /effect "Process a given section"
# //parameters
#	lines
# //returns
{
	my ($this, $lines) = @ARGUMENTS;

	my $line = $line_class->indirect_constructor;
	my $cursor = $cursor_class->indirect_constructor($lines, $line);

	my $prefix = 'Carrot';
	my $subject = $this->[ATR_SUBJECT];
	eval {
		while ($cursor->advance)
		{
			next if ($line->is_comment_or_blank);

			if (my ($name, $value) = $line->is_association)
			{
				$subject->dot_ini_got_association($name, $value);

			} elsif (my $values = $line->is_separated_values)
			{
				$subject->dot_ini_got_separated_values($values);

lib/Carrot/Personality/Reflective/Iterate/Array/Cursor.pm  view on Meta::CPAN

		require('Carrot/Personality/Reflective/Iterate/Array/Cursor./manual_modularity.pl');
	} #BEGIN

# =--------------------------------------------------------------------------= #

sub attribute_construction
# /type method
# /effect "Constructs the attribute(s) of a newly created instance."
# //parameters
#	elements
#	cursor
# //returns
{
	my ($this, $elements, $cursor) = @ARGUMENTS;

	$this->SUPER::attribute_construction($elements);
	$this->[ATR_CURSOR] = $cursor;

	return;
}

sub _re_constructor
# /type method
# /effect "Fills an newly constructed instance with life."
# //parameters
#	cursor
# //returns
{
	my ($this, $cursor) = @ARGUMENTS;

	$this->[ATR_CURSOR] = $cursor;

	return;
}

sub reset
# /type method
# /effect ""
# //parameters
# //returns
{

lib/Carrot/Personality/Valued/File/Name/Type/Regular/Content/UTF8_wBOM.pm  view on Meta::CPAN

{
	use strict;
	use warnings 'FATAL' => 'all';
	use open qw(:encoding(utf8));

	BEGIN {
		require('Carrot/Personality/Valued/File/Name/Type/Regular/Content/UTF8_wBOM./manual_modularity.pl');
	} #BEGIN

	Carrot::Meta::Greenhouse::Package_Loader::provide(
		my $cursor_class = '::Personality::Reflective::Iterate::Array::Cursor');

	Carrot::Meta::Greenhouse::Package_Loader::provide_instance(
		my $fatal_syscalls = '::Meta::Greenhouse::Fatal_Syscalls',
		my $translated_errors = '::Meta::Greenhouse::Translated_Errors');

	my $utf8_bom = "\x{feff}"; # used as UTF-8 file magic

# =--------------------------------------------------------------------------= #

sub read_into

lib/Carrot/Personality/Valued/File/Name/Type/Regular/Content/UTF8_wBOM.pm  view on Meta::CPAN

# /type method
# /effect ""
# //parameters
# //returns
#	?
{
	$_[THIS]->read_into(my $buffer);
	return([split(qr{(?:\012|\015\012?)}, $buffer, PKY_SPLIT_RETURN_FULL_TRAIL)]);
}

sub line_cursor
# /type method
# /effect ""
# //parameters
#	line
# //returns
#	::Personality::Abstract::Instance
{
	return($cursor_class->indirect_constructor(
		       $_[THIS]->read_lines,
		       $_[SPX_LINE]));
}

# =--------------------------------------------------------------------------= #

	return(PERL_FILE_LOADED);
}
# //revision_control
#	version 1.1.137



( run in 0.293 second using v1.01-cache-2.11-cpan-4d50c553e7e )