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