PDL::Lvalue(3pm)

PDL::Lvalue3pm

Declare pdl lvalue subs

Usage

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

Overview

Declares a subset of PDL functions so that they can be used as lvalue subs. In particular, this allows simpler constructs such as

  $x->slice(',(0)') .= 1;

instead of the clumsy

  (my $tmp = $x->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.

Functions

subs

test if routine is a known PDL lvalue sub

  print "slice is an lvalue sub" if PDL::Lvalue->subs('slice');

returns the list of PDL lvalue subs if no routine name is given, e.g.

  @lvfuncs = PDL::Lvalue->subs;

It can be used in scalar context to find out if your PDL has lvalue subs:

  print 'has lvalue subs' if PDL::Lvalue->subs;

Releases

11 releases since Debian 3.0 (Woody); the text changed 10 times.

  1. 3.0
  2. 3.1
  3. 4.0
  4. 5.0
  5. 6.0
  6. 7
  7. 8
  8. 9
  9. 10
  10. 11
  11. 12

Author

Copyright (C) 2001 Christian Soeller ([email protected]). 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 PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file.

From pdl 1:2.081-2 in Debian 12 (Bookworm). Parsed by carta from the page's man source.