Debian Codegraph @

Embperl/Form/Control/dump.pm

raw
1
2 ###################################################################################
3 #
4 # Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
5 # Embperl - Copyright (c) 2008-2014 Gerald Richter
6 #
7 # You may distribute under the terms of either the GNU General Public
8 # License or the Artistic License, as specified in the Perl README file.
9 #
10 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
11 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
12 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 #
14 # $Id$
15 #
16 ###################################################################################
17
18 package Embperl::Form::Control::dump ;
19
20 use strict ;
21 use base 'Embperl::Form::Control' ;
22
23 use Embperl::Inline ;
24 use Data::Dumper;
25 1 ;
26
27 __EMBPERL__
28
29 [# ---------------------------------------------------------------------------
30 #
31 # show_control - output the control
32 #]
33
34 [$ sub show_control ($self)
35
36 my $name = $self->{name};
37 my $value = exists $self->{value} ? $self->{value} : exists $fdat{$name} ? $fdat{$name} : \%fdat;
38
39 $]
40 <pre>[+ Dumper($value) +]</pre>
41 [$endsub$]
42
43 __END__
44
45 =pod
46
47 =head1 NAME
48
49 Embperl::Form::Control::dump - A debug control inside an Embperl Form
50
51
52 =head1 SYNOPSIS
53
54 {
55 type => 'dump',
56 text => 'blabla',
57 data => $some_data_structure_to_be_displayed
58 }
59
60 =head1 DESCRIPTION
61
62 Used to create a debug control inside an Embperl Form.
63 See Embperl::Form on how to specify parameters.
64
65 =head2 PARAMETER
66
67 =head3 type
68
69 Needs to be set to 'dump'.
70
71 =head3 text
72
73 Will be used as label for the debug control.
74
75 =head3 data
76
77 Some data structure to be displayed, e.g. hashref, arrayref or scalar.
78
79 =head1 Author
80
81 G. Richter (richter at embperl dot org), A. Beckert ([email protected])
82
83 =head1 See Also
84
85 perl(1), Embperl, Embperl::Form
86
87