Carrot

 view release on metacpan or  search on metacpan

lib/Carrot/Continuity/Coordination/Episode/Paragraph/TCP_Socket_IO/Buffer/Output.pm  view on Meta::CPAN

# /effect ""
# //parameters
#	data
# //returns
#	Mica::Projection::Flow_Control
{
	my ($this) = @ARGUMENTS;

	return(FLOW_STOP) if ($this->[ATR_STATE] == BST_CLOSED);

	my $l = (stat($_[SPX_DATA]))[7];
	return(FLOW_NOCHANGE) if ($l == 0);
	push(@{$this->[ATR_CHUNKS]}, [$_[SPX_DATA], 0, $l, 1]);
	$this->[ATR_SIZE] += $l;

	return($this->update);
}

sub add_scalar
# /type method
# /effect ""

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

		die("close: $OS_ERROR"));
}

sub stat
# /type method
# /effect ""
# //parameters
#	handle
# //returns
{
	my $rv = [CORE::stat($_[SPX_1ST_ARGUMENT])];
	unless (@$rv)
	{
		die("stat: $OS_ERROR");
	}
	return($rv);
}

sub lstat
# /type method
# /effect ""
# //parameters
#	handle
# //returns
#	?
{
	my $rv = [CORE::lstat($_[SPX_1ST_ARGUMENT])];
	unless (@$rv)
	{
		die("lstat: $OS_ERROR");
	}
	return($rv);
}

sub print
# /type method
# /effect ""

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

		read($file, my $bom_candidate, 1) //
			die("read: $OS_ERROR.");

		unless ($bom_candidate eq $utf8_bom)
		{
			seek($file, 0, 0) ||
				die("seek: $OS_ERROR.");
		}

		$_[SPX_BUFFER] //= '';
		read($file, $_[SPX_BUFFER], (stat($file))[RDX_STAT_SIZE]) //
			die("read: $OS_ERROR.");

		close($file) ||
			die("close: $OS_ERROR.");
		return(IS_TRUE);

	} or die("$file_name: $EVAL_ERROR");

	return;
}

lib/Carrot/Modularity/Package/Shadow.pm  view on Meta::CPAN

#	::Personality::Abstract::Boolean
{
	my ($pkg_file) = @ARGUMENTS;

	my $shadow_pkg = $pkg_patterns->dot_directory_from_file($pkg_file)
		. "shadow-$$compilation_name.pm";
	$writable_overlay->redirect_read(\$shadow_pkg);

	if (-f $shadow_pkg and -s _)
	{
		my $mtime1 = (stat($shadow_pkg))[RDX_STAT_MTIME];
		my $mtime2 = (stat($pkg_file))[RDX_STAT_MTIME];
		if ($mtime1 > $mtime2)
		{
			$_[SPX_PKG_FILE] = $shadow_pkg;
			return(IS_TRUE);
#		} else {
#			unlink($shadow_pkg);
		}
	}

	return(IS_FALSE);

lib/Carrot/Personality/Elemental/Scalar/Textual/File_Name.pm  view on Meta::CPAN

	return(IS_TRUE);
}

sub status
# /type method
# /effect ""
# //parameters
# //returns
#	::Personality::Abstract::Instance
{
	return($stat_class->constructor(stat(${$_[THIS]})));
}

sub status_of_link
# /type method
# /effect ""
# //parameters
# //returns
#	::Personality::Abstract::Instance
{
	return($stat_class->constructor(lstat(${$_[THIS]})));
}

sub concurrent_execution
# /type method
# /effect ""
# /parameters *
# //returns
#	::Personality::Abstract::Number
{
	my $this = shift(\@ARGUMENTS);

lib/Carrot/Personality/Valued/File/Name.pm  view on Meta::CPAN

	return((${$_[THIS]} =~ s{$re_parent_path}{}sro));
}

sub status
# /type method
# /effect ""
# //parameters
# //returns
#	::Personality::Abstract::Instance
{
	return($status_class->constructor([stat(${$_[THIS]})]));
}

sub access_timestamp_is_newer
# /type method
# /effect ""
# //parameters
#	that            ::Personality::Abstract::Instance
# //returns
#	?
{
	my ($exists1, $mtime1) = (-e ${$_[THIS]}, (stat(_))[RDX_STAT_ATIME]);
	return (IS_UNDEFINED) unless ($exists1);
	my ($exists2, $mtime2) = (-e ${$_[THAT]}, (stat(_))[RDX_STAT_ATIME]);
	return (IS_UNDEFINED) unless ($exists2);
	return($mtime2 > $mtime1);
}

sub access_timestamp_is_equal
# /type method
# /effect ""
# //parameters
#	that            ::Personality::Abstract::Instance
# //returns
#	?
{
	my ($exists1, $mtime1) = (-e ${$_[THIS]}, (stat(_))[RDX_STAT_ATIME]);
	return (IS_UNDEFINED) unless ($exists1);
	my ($exists2, $mtime2) = (-e ${$_[THAT]}, (stat(_))[RDX_STAT_ATIME]);
	return (IS_UNDEFINED) unless ($exists2);
	return($mtime2 == $mtime1);
}

sub modification_timestamp_is_newer
# /type method
# /effect ""
# //parameters
#	that            ::Personality::Abstract::Instance
# //returns
#	?
{
	my ($exists1, $mtime1) = (-e ${$_[THIS]}, (stat(_))[RDX_STAT_MTIME]);
	return (IS_UNDEFINED) unless ($exists1);
	my ($exists2, $mtime2) = (-e ${$_[THAT]}, (stat(_))[RDX_STAT_MTIME]);
	return (IS_UNDEFINED) unless ($exists2);
	return($mtime2 > $mtime1);
}

sub modification_timestamp_is_equal
# /type method
# /effect ""
# //parameters
#	that            ::Personality::Abstract::Instance
# //returns
#	?
{
	my ($exists1, $mtime1) = (-e ${$_[THIS]}, (stat(_))[RDX_STAT_MTIME]);
	return (IS_UNDEFINED) unless ($exists1);
	my ($exists2, $mtime2) = (-e ${$_[THAT]}, (stat(_))[RDX_STAT_MTIME]);
	return (IS_UNDEFINED) unless ($exists2);
	return($mtime2 == $mtime1);
}

sub status_timestamp_is_newer
# /type method
# /effect ""
# //parameters
#	that            ::Personality::Abstract::Instance
# //returns
#	?
{
	my ($exists1, $mtime1) = (-e ${$_[THIS]}, (stat(_))[RDX_STAT_CTIME]);
	return (IS_UNDEFINED) unless ($exists1);
	my ($exists2, $mtime2) = (-e ${$_[THAT]}, (stat(_))[RDX_STAT_CTIME]);
	return (IS_UNDEFINED) unless ($exists2);
	return($mtime2 > $mtime1);
}

sub status_timestamp_is_equal
# /type method
# /effect ""
# //parameters
#	that            ::Personality::Abstract::Instance
# //returns
#	?
{
	my ($exists1, $mtime1) = (-e ${$_[THIS]}, (stat(_))[RDX_STAT_CTIME]);
	return (IS_UNDEFINED) unless ($exists1);
	my ($exists2, $mtime2) = (-e ${$_[THAT]}, (stat(_))[RDX_STAT_CTIME]);
	return (IS_UNDEFINED) unless ($exists2);
	return($mtime2 == $mtime1);
}

sub has_extension
# /type method
# /effect ""
# //parameters
#	name
# //returns

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

}

sub byte_size_is_bigger
# /type method
# /effect ""
# //parameters
#	that            ::Personality::Abstract::Instance
# //returns
#	?
{
	return((stat(${$_[THAT]}))[RDX_STAT_SIZE]
		> (stat(${$_[THIS]}))[RDX_STAT_SIZE]);
}

sub byte_size_is_equal
# /type method
# /effect ""
# //parameters
#	that            ::Personality::Abstract::Instance
# //returns
#	?
{
	return((stat(${$_[THAT]}))[RDX_STAT_SIZE]
		== (stat(${$_[THIS]}))[RDX_STAT_SIZE]);
}

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

	return(PERL_FILE_LOADED);
}
# //revision_control
#	version 1.1.83
#	branch main
#	maturity alpha

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

	print STDERR "READ_INTO $$this\n" if (TRACE_FLAG);
	eval {
		$fatal_syscalls->open(my $file, PKY_OPEN_MODE_READ, $$this);

		binmode($file) if (OS_NEEDS_BINMODE);

		$_[SPX_BUFFER] //= '';
		$fatal_syscalls->read(
			$file,
			$_[SPX_BUFFER],
			(stat($file))[RDX_STAT_SIZE]);

		$fatal_syscalls->close($file);
		return(IS_TRUE);

	} or $translated_errors->escalate(
		'named_file_operation',
		[$$this],
		$EVAL_ERROR);

	return;

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

		$fatal_syscalls->read($file, my $first_character, 1);
		unless ($first_character eq $utf8_bom)
		{
			seek($file, 0, 0);
		}

		$_[SPX_BUFFER] //= '';
		$fatal_syscalls->read(
			$file,
			$_[SPX_BUFFER],
			(stat($file))[RDX_STAT_SIZE]);

		$fatal_syscalls->close($file);
		return(IS_TRUE);

	} or $translated_errors->escalate(
		'named_file_operation',
		[$$this],
		$EVAL_ERROR);

	return;

lib/Carrot/Productivity/Text/Placeholder/Miniplate/OS/Unix/File/Properties.pm  view on Meta::CPAN

{
	my ($this, $name) = @ARGUMENTS;

	unless (-e $name)
	{
		$file_not_found->raise_exception(
			{'file_name' => $name},
			ERROR_CATEGORY_SETUP);
	}
	$this->[ATR_SUBJECT] = $name;
	$this->[ATR_STAT] = [stat($name)];

	return;
}

sub syp_file_mode_octal
# /type method
# /effect ""
# //parameters
# //returns
#	?



( run in 2.231 seconds using v1.01-cache-2.11-cpan-49f99fa48dc )