PDLx::Role::RestrictedPDL -- restrict write access to a PDL object as much as possible
package MyPDL; use Moo; with 'PDLx::Role::RestrictedPDL';
This role overloads assignment operators and the is_inplace, is_inplace, and set_inplace, methods to attempt to prevent mutation of a piddle.
This does not provide a readonly PDL! Currently that's impossible. It tries to make common operations croak, but cannot handle corner cases.
Please report any bugs or feature requests to bug-pdlx-mask@rt.cpan.org, or through the web interface at http://rt.cpan.org/Public/Dist/Display.html?Name=PDLx-Mask.
bug-pdlx-mask@rt.cpan.org
Version 0.01
Copyright (c) 2016 The Smithsonian Astrophysical Observatory
PDLx::Mask is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Diab Jerius <djerius@cpan.org>
To install PDLx::Mask, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PDLx::Mask
CPAN shell
perl -MCPAN -e shell install PDLx::Mask
For more information on module installation, please visit the detailed CPAN module installation guide.