From d65398919301dc330491e30ebdfd2026c18ad56a Mon Sep 17 00:00:00 2001 From: martinahansen Date: Thu, 26 Nov 2009 12:57:52 +0000 Subject: [PATCH] Cleaned BBrowser::Draw git-svn-id: http://biopieces.googlecode.com/svn/trunk@779 74ccb610-7750-0410-82ae-013aeee3265d --- code_perl/Maasha/BBrowser/Draw.pm | 18 ++---------------- code_perl/Maasha/XHTML.pm | 30 ++++++++++++++++++++++++++++++ www/index.cgi | 4 ++-- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/code_perl/Maasha/BBrowser/Draw.pm b/code_perl/Maasha/BBrowser/Draw.pm index 00ecba1..c250ae9 100644 --- a/code_perl/Maasha/BBrowser/Draw.pm +++ b/code_perl/Maasha/BBrowser/Draw.pm @@ -44,6 +44,8 @@ use vars qw( @ISA @EXPORT ); sub draw_feature { + # Martin A. Hansen, November 2009 + # Given a list of features add these to # a Cairo::Context object. @@ -143,22 +145,6 @@ sub file_png } -sub hdump -{ - my ( $foo ) = @_; - - my ( @html ); - - @html = "Content-Type: text/html; charset=ISO-8859-1\n\n"; - - push @html, "
\n";
-    push @html, Dumper( $foo );
-    push @html, "
\n"; - - return wantarray ? @html : \@html; -} - - # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 1; diff --git a/code_perl/Maasha/XHTML.pm b/code_perl/Maasha/XHTML.pm index 3a97af1..7fd5f69 100755 --- a/code_perl/Maasha/XHTML.pm +++ b/code_perl/Maasha/XHTML.pm @@ -1600,4 +1600,34 @@ sub input_field } +# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DEBUG <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + + +sub hdump +{ + # Martin A. Hansen, November 2009. + # + # Primitive debug routine that returns given data + # in
 tags as HTML lines.
+
+    my ( $data,   # data to dump
+       ) = @_;
+
+    # Returns a list
+
+    my ( @html );
+
+    @html = "Content-Type: text/html; charset=ISO-8859-1\n\n";
+
+    push @html, "
\n";
+    push @html, Dumper( $data );
+    push @html, "
\n"; + + return wantarray ? @html : \@html; +} + + # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + +1; + diff --git a/www/index.cgi b/www/index.cgi index 41256f3..701aa86 100755 --- a/www/index.cgi +++ b/www/index.cgi @@ -59,8 +59,8 @@ push @html, Maasha::XHTML::form_end; push @html, Maasha::XHTML::body_end; push @html, Maasha::XHTML::html_end; -# push @html, Maasha::BBrowser::Draw::hdump( $cgi->param ); # DEBUG -# push @html, Maasha::BBrowser::Draw::hdump( $cookie ); # DEBUG +# push @html, Maasha::XHTML::hdump( $cgi->param ); # DEBUG +# push @html, Maasha::XHTML::hdump( $cookie ); # DEBUG print "$_\n" foreach @html; -- 2.39.5