Canonical developer documentation lives in lib/PDL/DeveloperGuide.pod
(PDL::DeveloperGuide) and lib/PDL/PP.pod (PDL::PP). Keep this file
concise and aligned with PDL::DeveloperGuide as the single source of truth.
perl Makefile.PL
make -j$(nproc)
make && prove -bv t/core.t # single test against blib/
make -j$(nproc) test # full suite against blib/
perl -Mblib -MPDL -E 'say $PDL::VERSION'- Always use
-Mblib, never bare-Iblib/lib. - Update
MANIFESTwhenever adding or removing tracked files.
- Column-first indexing, row-major storage: Dimension 0 (
X/ column) is contiguous in memory. Transpose (->transpose/->t/->xchg(0,1)) when interfacing with column-major Fortran/OpenGL APIs. - Explicit slicing in library code: Use
$pdl->slice(...)in modules; reservePDL::NiceSlicefor interactive shells/scripts. - Zero-copy slicing & dataflow: Slices share memory and propagate changes
back to parents unless detached with
->sever(). - Design for complex, bad values, and broadcasting: Use
PDL_IF_BAD/HandleBad => 1and consider complex types and broadcasting from the start. - Tests: Use
Test::More+Test::PDL(is_pdl($got, $expected)). - Debugging: Use
PDL::Core::set_debugging(1)(PDLDEBUG_f),PDL::Core::pdump($pdl)+utils/address-pseudonymise, and$::PP_VERBOSE = 1aroundpp_def.
- Hard-fail (
die) inMakefile.PLon missing native dependencies (neverexit 0); preserve quotes inPDL::Core::Dev::PDL_INCLUDE(). - License under
perl_5("the same terms as Perl itself") with a top-levelLICENSEfile. For library bindings, consider documenting supported types with=head1 TYPESPOD. - Use
PDLPorters/devopscomposite GitHub Actions (ci-dist,install-dep-<lib>) for CI.
See CLAUDE.md and lib/PDL/DeveloperGuide.pod for further details.