PDL::Exporter(3pm)
π NAME π
Okay bestie, welcome to PDL::Exporter(3pm) β PDL export control, and yes it's exactly as iconic as it sounds π
β¨ DESCRIPTION β¨
So like, this module implements the standard conventions for import of PDL modules in to the namespace. It's giving "we have a system and the system is the vibe."
And hopefully it will be extended to allow fine control of which namespace is used β manifesting that fr fr π
πΈ SYNOPSIS πΈ
use PDL::Exporter;
use PDL::MyModule; # Import default function list ':Func'
use PDL::MyModule ''; # Import nothing (OO)
use PDL::MyModule '...'; # Same behaviour as Exporter
Three lines, three moods: default import, the iconic '' "import nothing, I'm doing OO" move, and then '...' which is literally just the same behaviour as Exporter. Lowkey unbothered, highkey correct π
π SUMMARY π
PDL::Exporter is a drop-in replacement for the Exporter module β like, swap it in, no drama, no cap. It confers the standard PDL export conventions to your module, and the usage is pretty straightforward and honestly best illustrated by an example (which we are about to do, keep up π¦).
The following shows typical usage near the top of a simple PDL module:
package PDL::MyMod;
use strict;
# For Perl 5.6:
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# For more modern Perls:
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
require PDL::Exporter;
@ISA = qw(PDL::Exporter);
@EXPORT_OK = qw(inc myfunc); # these will be exported by default
%EXPORT_TAGS = (Func=>[@EXPORT_OK],
Internal => [qw/internfunc1 internfunc2/],
);
# ... body of your module
1; # end of simple module
Look at her go π₯Ή @ISA = qw(PDL::Exporter) is the whole main character moment, @EXPORT_OK carries inc and myfunc, and the %EXPORT_TAGS hash splits things into a Func tag (which is just @EXPORT_OK) and an Internal tag holding internfunc1 and internfunc2. And then 1; at the end because Perl is like that π
π«Ά SEE ALSO π«Ά
Exporterβ the blueprint, the blueprint's blueprint, iykyk
π AUTHOR π
Copyright (C) Karl Glazebrook (<kgb@aaoepp.aao.gov.au>). Some docs by Christian Soeller. All rights reserved. There is no warranty β none, zero, do not come for her π
You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. And if this file is separated from the PDL distribution, the copyright notice should be included in the file β like, take the whole vibe with you, don't orphan the receipts π§
k bye bestie, that's the whole page β brought to you by perl v5.42.3, dated 2026-08-20, filed under PDL::Exporter(3pm) πβ¨
π¦ where this page comes from
- ubuntu stonking: pdl 1:2.106-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms