Package::Transporter::Generator::Potential::Argument_in_Name - Hardwire one argument in the name of the subroutine


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

Index


NAME

Top

Package::Transporter::Generator::Potential::Argument_in_Name - Hardwire one argument in the name of the subroutine

SYNOPSIS

Top

	#!/usr/bin/perl -W -T
	use strict;

	use Package::Transporter sub{eval shift}, sub {
		$_[0]->register_potential('::Argument_in_Name',
			'FOR_ANY', 'calc_');
	};

	sub calc {
		my ($correction, $a, $b) = @_;
		return($a * $correction/100 + $b);
	};

	package Other;
	use Package::Transporter sub{eval shift};

	print calc_5(7, 8), "\n"; # sets $correction = 5
	#my $result = calc_5 7, 8; # error

	exit(0);

DESCRIPTION

Top

A proof-of-concept for another option for configuring the argument list in proxy calls.

ANYTHING ELSE

Top

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


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