PDL::P...ontrol(3pm)
π NAME π
PDL::Perldl2::Plugin::PrintControl β bestie, this one literally just turns off the default print output so your terminal stops screaming at you π
β¨ SYNOPSIS β¨
pdl> $x = 3;
3
pdl> $_REPL->load_plugin('PDL::Perldl2::Plugin::PrintControl');
pdl> $x;
pdl> $_REPL->print_by_default(1);
1
pdl> $x;
3
see how quiet it went?? chef's kiss π
π¦ DESCRIPTION π¦
okay so, by default Devel::REPL always prints the results of its evaluation. No filter. No chill. π And like β fine for tiny lil objects, sure. But for things like large data objects (e.g. a 100x100 matrix in PDL)?? the result can be hundreds of lines of output for every single command. absolutely NOT. π
This plugin disables that default print output, and adds an attribute with the accessor method print_by_default, which you can use to toggle the print default on or off. that's the whole vibe check β¨
π METHODS π
πΈ print_by_default
By default, the PrintControl plugin sets print_by_default to 0 (false), which disables automatic printing of results. So no surprises, no walls of numbers.
Call the print_by_default accessor with a 1 (true value) to enable default printing. Flip it back on whenever you want, no judgement π«Ά
π do_print
This is a convenience accessor for the print_by_default attribute. It's giving β¨shortcutβ¨ energy.
- If you call this method without a value, it toggles the current setting. surprise! π
- Otherwise, it just sets
print_by_defaultto the value you gave it. simple as that.
It is also available in the pdl2 shell as the do_print sub with the same operation but with an implicit use of $_REPL. so like, convenient π
π₯ SEE ALSO π₯
"Devel::REPL"
π AUTHOR π
Chris Marshall, "<chm at cpan dot org>"
we love a legend π
π COPYRIGHT AND LICENSE π
Copyright (C) 2010 by Christopher Marshall
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
ok bestie real talk: this page came from the User Contributed Perl Documentation, it's forPDL::P...ontrol(3pm), and the version/date sitting at the bottom of the original isperl v5.40.1,2026-03-08. slay, go turn off that print default πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: libpdl-perldl2-perl 2.003-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