NAME
PDLA::Lvalue - declare PDLA lvalue subs
DESCRIPTION
Declares a subset of PDLA functions so that they can be used as lvalue subs. In particular, this allows simpler constructs such as
$a->slice(',(0)') .= 1;
instead of the clumsy
(my $tmp = $a->slice(',(0)')) .= 1;
This will only work if your perl supports lvalue subroutines (i.e. versions >= v5.6.0). Note that lvalue subroutines are currently regarded experimental.
SYNOPSIS
use PDLA::Lvalue; # automatically done with all PDLA loaders
FUNCTIONS
subs
test if routine is a known PDLA lvalue sub
print "slice is an lvalue sub" if PDLA::Lvalue->subs('slice');
returns the list of PDLA lvalue subs if no routine name is given, e.g.
@lvfuncs = PDLA::Lvalue->subs;
It can be used in scalar context to find out if your PDLA has lvalue subs:
print 'has lvalue subs' if PDLA::Lvalue->subs;
AUTHOR
Copyright (C) 2001 Christian Soeller (c.soeller@auckland.ac.nz). All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDLA distribution. If this file is separated from the PDLA distribution, the copyright notice should be included in the file.