.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Lvalue 3pm" .TH Lvalue 3pm 2024-04-25 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PDL::Lvalue \- declare PDL lvalue subs .SH DESCRIPTION .IX Header "DESCRIPTION" Declares a subset of PDL functions so that they can be used as lvalue subs. In particular, this allows simpler constructs such as .PP .Vb 1 \& $x\->slice(\*(Aq,(0)\*(Aq) .= 1; .Ve .PP instead of the clumsy .PP .Vb 1 \& (my $tmp = $x\->slice(\*(Aq,(0)\*(Aq)) .= 1; .Ve .PP This will only work if your perl supports lvalue subroutines (i.e. versions >= v5.6.0). Note that lvalue subroutines are currently regarded experimental. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use PDL::Lvalue; # automatically done with all PDL loaders .Ve .SH FUNCTIONS .IX Header "FUNCTIONS" .SS subs .IX Subsection "subs" test if routine is a known PDL lvalue sub .PP .Vb 1 \& print "slice is an lvalue sub" if PDL::Lvalue\->subs(\*(Aqslice\*(Aq); .Ve .PP returns the list of PDL lvalue subs if no routine name is given, e.g. .PP .Vb 1 \& @lvfuncs = PDL::Lvalue\->subs; .Ve .PP It can be used in scalar context to find out if your PDL has lvalue subs: .PP .Vb 1 \& print \*(Aqhas lvalue subs\*(Aq if PDL::Lvalue\->subs; .Ve .SH AUTHOR .IX Header "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 PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file.