PrintControl(3pm)
π PrintControl(3pm) β the manual page, but make it a vibe
okay so bestie, welcome to PrintControl(3pm) π it lives in the User Contributed Perl Documentation corner of the perl universe, and honestly? it's a tiny plugin with one job and it does it flawlessly. no cap.
β¨ NAME β¨
PDL::Perldl2::Plugin::PrintControl β disable default print output π«Ά
πΈ 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
like, watch the silence after the plugin loads. that blank line? that's the whole point. icon behavior, truly. πβ¨
π¦ DESCRIPTION π¦
so here's the tea. by default, Devel::REPL always prints the results of its evaluation. and for small objects? adorable. perfect. no notes.
but for things like large data objects β think a 100x100 matrix in PDL β the result can be hundreds of lines of output for each command. hundreds. bestie. your terminal is not okay. π
this plugin disables the default print output and adds an attribute with accessor method print_by_default which you can use to toggle the print default on or off. main character toggle energy. π
π METHODS π
π print_by_default
by default, the PrintControl plugin sets print_by_default to 0 (false), which disables automatic printing of results. lowkey genius.
call the print_by_default accessor with a 1 (a true value) to enable default printing. that's it. that's the method. π
π do_print
this is a convenience accessor for the print_by_default attribute.
- if you call this method without a value, it toggles the current setting. surprise! β¨
- otherwise, it just sets
print_by_defaultto the value.
it is also available in the pdl2 shell as the do_print sub with the same operation, but with an implicit use of $_REPL. iykyk. π§
π₯ SEE ALSO π₯
"Devel::REPL"
π AUTHOR π
Chris Marshall, "<chm at cpan dot org>" π
π 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.
fr fr, that's the whole page. every flag, every method, every vibe. you're welcome. πΈ
and that's a wrap, bestie β this was perl v5.38.2, dated 2024-04-10, and you just finished reading PrintControl(3pm). slay. ππ
π¦ where this page comes from
- ubuntu noble: pdl 1:2.085-1ubuntu1 Β· 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