1PrintControl(3)       User Contributed Perl Documentation      PrintControl(3)
2
3
4

NAME

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

SYNOPSIS

9         pdl> $x = 3;
10         3
11         pdl> $_REPL->load_plugin('PDL::Perldl2::Plugin::PrintControl');
12
13         pdl> $x;
14
15         pdl> $_REPL->print_by_default(1);
16         1
17         pdl> $x;
18         3
19

DESCRIPTION

21       By default the Devel::REPL always prints the results of its evaluation.
22       This is fine for small objects but for things like large data objects
23       (e.g. a 100x100 matrix in PDL) the result can be hundreds of lines of
24       output for each command.
25
26       This plugin disables the default print output and adds an attribute
27       with accessor method "print_by_default" which can be used to toggle the
28       print default on or off.
29

METHODS

31   print_by_default
32       By default, the "PrintControl" plugin sets "print_by_default" to 0
33       (false), which disables automatic printing of results.  Call the
34       print_by_default accessor with a 1 (true value) to enable default
35       printing.
36
37   do_print
38       This is a convenience accessor for the print_by_default attribute.  If
39       you call this method without a value, it toggles the current setting.
40       Otherwise, it just sets print_by_default to the value.
41
42       It is also available in the "pdl2" shell as the do_print sub with the
43       same operation but with an implicit use of $_REPL.
44

SEE ALSO

46       "Devel::REPL"
47

AUTHOR

49       Chris Marshall, "<chm at cpan dot org>"
50
52       Copyright (C) 2010 by Christopher Marshall
53
54       This library is free software; you can redistribute it and/or modify it
55       under the same terms as Perl itself.
56
57
58
59perl v5.32.1                      2021-02-15                   PrintControl(3)
Impressum