|
NAMEData::Bind - Bind and alias variablesSYNOPSISuse Data::Bind; # bind simple variables sub foo { my $y = 10; my $x; bind_op('$x' => $y); } # bind for subroutine calls Data::Bind->sub_signature (\&formalize, { var => '$title' }, { var => '&code'}, { var => '$subtitle', optional => 1 }, { var => '$case', named_only => 1 }, { var => '$justify', named_only => 1 }); sub formalize { my ($title, $subtitle, $case, $justify); Data::Bind->arg_bind(\@_); } formalize([\('this is title', sub { "some code" }) ], # positional { subtitle => \'hello'} ); #named DESCRIPTIONThis module implements the semantics for perl6-style variable binding, as well as subroutine call argument passing and binding, in Perl 5.AUTHORSChia-liang Kao <clkao@clkao.org>COPYRIGHTCopyright (c) 2006. Chia-liang Kao. All rights reserved.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> SEE ALSOSub::MultiTODO: Add a good reference to Perl6 multiple dispatch here. TODO: Add a good reference to Perl6 variable binding semantics AUTHORSChia-liang Kao <clkao@clkao.org>COPYRIGHTCopyright 2006 by Chia-liang Kao and others.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html>
Visit the GSP FreeBSD Man Page Interface. |