Sub::Prototype::Util

Sub::Prototype::Util is a Perl module with prototype-related utility routines.
Download

Sub::Prototype::Util Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Vincent Pit
  • Publisher web site:
  • http://search.cpan.org/~vpit/

Sub::Prototype::Util Tags


Sub::Prototype::Util Description

Sub::Prototype::Util is a Perl module with prototype-related utility routines. Sub::Prototype::Util is a Perl module with prototype-related utility routines.SYNOPSIS use Sub::Prototype::Util qw/flatten recall wrap/; my @a = qw/a b c/; my @args = ( @a, 1, { d => 2 }, undef, 3 ); my @flat = flatten '@$;$', @args; # ('a', 'b', 'c', 1, { d => 2 }) recall 'CORE::push', @args; # @a contains 'a', 'b', 'c', 1, { d => 2 }, undef, 3 my $splice = wrap 'CORE::splice', compile => 1; my @b = $splice->(@a, 4, 2); # @a is now ('a', 'b', 'c', 1, 3) and @b is ({ d => 2 }, undef)Prototypes are evil, but sometimes you just have to bear with them, especially when messing with core functions. This module provides several utilities aimed at facilitating "overloading" of prototyped functions. Requirements: · Perl


Sub::Prototype::Util Related Software