PDL::P...ontrol(3pm)

πŸ“¦ version 2.003, in ubuntu stonking

πŸ’… 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 πŸ‘‘

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_default to 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 (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 for PDL::P...ontrol(3pm), and the version/date sitting at the bottom of the original is perl v5.40.1, 2026-03-08. slay, go turn off that print default πŸ’–βœ¨πŸ¦‹
πŸ“¦ where this page comes from