Perl6::Contexts

Perl6::Contexts - array and hash variables turn into references to themselves when used in non-numeric scalar context.
Download

Perl6::Contexts Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • SWALTERS
  • Publisher web site:
  • http://search.cpan.org/~swalters/Perl6-Contexts-0.4/Contexts.pm

Perl6::Contexts Tags


Perl6::Contexts Description

Perl6::Contexts - array and hash variables turn into references to themselves when used in non-numeric scalar context. Perl6::Contexts - array and hash variables turn into references to themselves when used in non-numeric scalar context or as function arguments.SYNOPSIS my @foo = ( 1 .. 20 ); my $foo = @foo; # same as: my $foo = @foo; my $foo = 0 + @foo; # unchanged - length of @foo $obj->some_method(10, 20, @foo); # same as: $obj->some_method(10, 20, @foo); some_function(10, 20, @foo); # same as: some_function(10, 20, @foo);Perl6::Contexts makes Perl 5 behave more like Perl 6 with regard to the array and hash variables as used as arguments to operators, method calls, and functions.This module doesn't add new syntax -- it merely changes the meaning of existing syntax. Using this module to make Perl 5 more like Perl 6 won't go very far towards writing Perl 5 that will run under Perl 6 but it will help you get used to some of the changes.To run legacy Perl 5 along side Perl 6, check out PONIE or Inline::Pugs.Requirements:· Perl Requirements: · Perl


Perl6::Contexts Related Software