Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An alternative to PDL::NiceSlice using Devel::Declare
Perl
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/PDL
t
README.pod
dist.ini

README.pod

NAME

PDL::DeclareSlice - An alternative to PDL::NiceSlice using Devel::Declare.

SYNOPSIS

 use PDL
 use PDL::DeclareSlice;

 my $pdl = xvals(5);
 print sl $pdl(1:2); # prints [1 2]

DESCRIPTION

Adds a keyword (of your choosing, by default sl) which triggers slicing of a PDL object. The slice spec will be enclosed in double quotes, so no quotes are needed.

PRE-ALPHA!!!

This is an early version of this module. It uses Devel::Declare which while it is not a source filter still uses some deep magic which may have serious issues. You are invited to file bugs and patch. I also welcome any thoughts on how to improve it.

OPTIONS

Most of the magic in this module is performed when the module is loaded (use PDL::DeclareSlice). Options may be passed at this point (or when calling the import method). These options are passed as a hashref to the use or import (i.e., use PDL::DeclareSlice {key => value}) method and are as follows:

  • verbose - If set to true will print (some) debug info, most importantly the post-parse resultant line of code. Defaults to false.
  • keyword - String which will define the keyword which invokes the slice. By default this is sl.

SOURCE REPOSITORY

http://github.com/jberger/PDL-DeclareSlice

AUTHOR

Joel Berger, <joel.a.berger@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2011 by Joel Berger

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Something went wrong with that request. Please try again.