GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PrintControl(3) User Contributed Perl Documentation PrintControl(3)

PDL::Perldl2::Plugin::PrintControl - disable default print output

  pdl> $a = 3;
  3
  pdl> $_REPL->load_plugin('PDL::Perldl2::Plugin::PrintControl');

  pdl> $a;

  pdl> $_REPL->print_by_default(1);
  1
  pdl> $a;
  3

By default the Devel::REPL always prints the results of its evaluation. This is fine for small objects but for things like large data objects (e.g. a 100x100 matrix in PDL) the result can be hundreds of lines of output for each command.

This plugin disables the default print output and adds an attribute with accessor method "print_by_default" which can be used to toggle the print default on or off.

By default, the "PrintControl" plugin sets "print_by_default" to 0 (false), which disables automatic printing of results. Call the print_by_default accessor with a 1 (true value) to enable default printing.

This is a convenience accessor for the print_by_default attribute. If you call this method without a value, it toggles the current setting. Otherwise, it just sets print_by_default to 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.

"Devel::REPL"

Chris Marshall, "<chm at cpan dot org>"

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.

2018-05-05 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.