1Lvalue(3)             User Contributed Perl Documentation            Lvalue(3)
2
3
4

NAME

6       PDL::Lvalue - declare PDL lvalue subs
7

DESCRIPTION

9       Declares a subset of PDL functions so that they can be used as lvalue
10       subs. In particular, this allows simpler constructs such as
11
12         $x->slice(',(0)') .= 1;
13
14       instead of the clumsy
15
16         (my $tmp = $x->slice(',(0)')) .= 1;
17
18       This will only work if your perl supports lvalue subroutines (i.e.
19       versions  >= v5.6.0). Note that lvalue subroutines are currently
20       regarded experimental.
21

SYNOPSIS

23        use PDL::Lvalue; # automatically done with all PDL loaders
24

FUNCTIONS

26   subs
27       test if routine is a known PDL lvalue sub
28
29         print "slice is an lvalue sub" if PDL::Lvalue->subs('slice');
30
31       returns the list of PDL lvalue subs if no routine name is given, e.g.
32
33         @lvfuncs = PDL::Lvalue->subs;
34
35       It can be used in scalar context to find out if your PDL has lvalue
36       subs:
37
38         print 'has lvalue subs' if PDL::Lvalue->subs;
39

AUTHOR

41       Copyright (C) 2001 Christian Soeller (c.soeller@auckland.ac.nz). All
42       rights reserved. There is no warranty. You are allowed to redistribute
43       this software / documentation under certain conditions. For details,
44       see the file COPYING in the PDL distribution. If this file is separated
45       from the PDL distribution, the copyright notice should be included in
46       the file.
47
48
49
50perl v5.30.2                      2020-04-02                         Lvalue(3)
Impressum