Package::Transporter::Generator::Potential::Fatal - Partial bridge to Fatal.pm


Package-Transporter documentation  | view source Contained in the Package-Transporter distribution.

Index


NAME

Top

Package::Transporter::Generator::Potential::Fatal - Partial bridge to Fatal.pm

SYNOPSIS

Top

	use Carp;
	use Package::Transporter sub{eval shift}, sub {
		$_[0]->register_potential('::Fatal', 'FOR_SELF', 'fatal_');
	};

	sub yn($) { print STDERR ($_[0] ? 'Yes' : 'No'), "\n"; };

	yn(!defined(&fatal_open));
	yn(potentially_defined('fatal_open'));

	fatal_open(my $F, 'a'); # open(my $F, 'a') || die...

	yn(defined(&fatal_open));
	exit(0);

DESCRIPTION

Top

A proxy to syscall-related subroutines, which indicate an error via $!. Removes the fatal_ prefix and executes the rest. Makes any error fatal through die.

Respects any prototype definition of the original command and submits the arguments accordingly with the help of Fatal.pm. However, no prototype support for prefixed command, yet.

ANYTHING ELSE

Top

Please see the documentation of the upstream package Package::Transporter.


Package-Transporter documentation  | view source Contained in the Package-Transporter distribution.