Package::Transporter::Generator::Potential::Simple_Stubs - Simple subroutines stubs


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

Index


NAME

Top

Package::Transporter::Generator::Potential::Simple_Stubs - Simple subroutines stubs

SYNOPSIS

Top

	use Package::Transporter sub{eval shift}, sub {
		my $generator = $_[0]->create_generator('::Simple_Stubs',
			'simple_stubs.txt');
		$_[0]->register_potential($generator, 'FOR_SELF');
	};

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

	yn(potentially_defined('hello_worlds'));
	yn(potentially_defined('hello_world'));
	yn(!defined(&hello_world));

	hello_world();

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

DESCRIPTION

Top

Creates simple subroutines with a return statement. Content of the return is defined in an external file.

Format of Stub Definitions

Tab separated values. Name of subroutine, tab, return value.

	hello_world	$_[0]
	hola_mundo	''
	salut_monde	5
	*	undef

ANYTHING ELSE

Top

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


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