Catman...::Mock(3pm)
πΈ NAME πΈ β a whole exporter that does absolutely nothing
okay bestie, welcome to the Catman...::Mock(3pm) page, straight out of the User Contributed Perl Documentation π
and yes, the name is doing a little bit of trolling on purpose:
Catmandu::Exporter::Mockβ an exporter that doesn't export anything πβ¨
like. that's the whole job. that's the assignment. and she ate. π
β¨ SYNOPSIS β¨
bestie you can run her from the commandline or from Perl, dealer's choice π
# From the commandline
$ catmandu convert JSON --fix myfixes to Mock < /tmp/data.json
# From Perl
use Catmandu;
# Print to STDOUT
my $exporter = Catmandu->exporter('Mock',fix => 'myfix.txt');
$exporter->add_many($arrayref);
$exporter->add_many($iterator);
$exporter->add_many(sub { });
$exporter->add($hashref);
printf "exported %d items\n" , $exporter->count;
# Get an array ref of all records exported
my $data = $exporter->as_arrayref;
notice how add_many will happily take an $arrayref, an $iterator, or a plain old sub { } π she's flexible like that.
π DESCRIPTION π
so here's the tea β this exporter exports nothing. like, zero. nada. it is the void. it is the "no thoughts head empty" of exporters π¦
you use it in situations where you, for example, export data from a fix β the vibes are immaculate, the output is nonexistent.
but WAIT. here's the plot twist that makes her main character energy π: unlike the Null exporter, the Mock exporter keeps an internal array of all the records that got exported, and you can pull that whole array back out with the as_arrayref method. so she looks like she's doing nothing but she's secretly keeping receipts ππ
π SEE ALSO π
go say hi to her quieter sibling:
Catmandu::Exporter::Null
fr fr, if you came here looking for actual exported files: they're not coming. she said "no π" and honestly? iconic.
okay that's the whole page bestie!! this was written by way of perl v5.40.1 and dated 2026-01-24, and the page itself is Catman...::Mock(3pm) π«Ά mwah, go forth and export nothing, you're doing amazing sweetie πβ¨
π¦ where this page comes from
- ubuntu resolute: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-perl 1.2025-1 Β· 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