NAME
Devel::REPL::Plugin::NiceSlice - enable PDL NiceSlice syntax
DESCRIPTION
This plugin enables one to use the PDL::NiceSlice syntax in an instance of Devel::REPL
such as the new Perldl2
shell. Without the plugin, array slicing looks like this:
PDL> use PDL;
PDL> $a = sequence(10);
$PDL1 = [0 1 2 3 4 5 6 7 8 9];
PDL> $a->slice("2:9:2");
$PDL1 = [2 4 6 8];
After the NiceSlice plugin has been loaded, you can use this:
PDL> $a(2:9:2)
$PDL1 = [2 4 6 8];
CAVEATS
PDL::NiceSlice
uses Perl source preprocessing. If you need 100% pure Perl compatibility, use the slice method instead.
SEE ALSO
PDL::NiceSlice
, Devel::REPL
AUTHOR
Chris Marshall, <chm at cpan dot org>
COPYRIGHT AND LICENSE
Copyright (C) 2010 by Christopher Marshall
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.