| 1 | =head1 NAME | ||
| 2 | |||
| 3 | PDL::Lite - minimum PDL module OO loader | ||
| 4 | |||
| 5 | =head1 SYNOPSIS | ||
| 6 | |||
| 7 | use PDL::Lite; # Is equivalent to the following: | ||
| 8 | |||
| 9 | use PDL::Core ''; | ||
| 10 | use PDL::Ops ''; | ||
| 11 | use PDL::Primitive ''; | ||
| 12 | use PDL::Ufunc ''; | ||
| 13 | use PDL::Basic ''; | ||
| 14 | use PDL::Slices ''; | ||
| 15 | use PDL::Bad ''; | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | Loads the smallest possible set of modules for | ||
| 20 | PDL to work, importing only those functions always defined by | ||
| 21 | L<PDL::Core>) into the current namespace | ||
| 22 | (C<pdl>, C<barf> and C<null>). | ||
| 23 | This is the absolute minimum set for PDL. | ||
| 24 | |||
| 25 | Access to other functions is by method syntax, viz: | ||
| 26 | |||
| 27 | $x = PDL->pdl(1, 2, 3, 4, 5); | ||
| 28 | $x->wibble(42); | ||
| 29 | |||
| 30 | Note that unlike L<PDL>, this does I<not> load L<PDL::Math> or | ||
| 31 | L<PDL::MatrixOps>, nor any IO modules. | ||
| 32 | |||
| 33 | =cut | ||
| 34 | |||
| 35 | package PDL::Lite; | ||
| 36 | |||
| 37 | 60 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 38 | 60 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 39 | |||
| 40 | 60 | ▶ | use PDL::Core qw(pdl piddle barf null); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 41 | 60 | ▶ | use PDL::Ops ''; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 42 | 60 | ▶ | use PDL::Primitive ''; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 43 | 60 | ▶ | use PDL::Ufunc ''; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 44 | 60 | ▶ | use PDL::Basic ''; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 45 | 60 | ▶ | use PDL::Slices ''; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 46 | 60 | ▶ | use PDL::Bad ''; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 47 | 60 | require PDL; # for VERSION | |
| 48 | |||
| 49 | 60 | our $VERSION = $PDL::VERSION; | |
| 50 | |||
| 51 | 60 | our @ISA = qw( PDL::Exporter ); | |
| 52 | |||
| 53 | 60 | our @EXPORT = qw( piddle pdl null barf ); # Only stuff always exported! | |
| 54 | 60 | our %EXPORT_TAGS = ( | |
| 55 | Func => [@EXPORT], | ||
| 56 | ); | ||
| 57 | |||
| 58 | |||
| 59 | ;# Exit with OK status | ||
| 60 | |||
| 61 | 60 | 1; | |