/[pxelator]/lib/PXElator/html.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /lib/PXElator/html.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 72 - (hide annotations)
Thu Jul 30 23:57:19 2009 UTC (14 years, 8 months ago) by dpavlin
File size: 526 byte(s)
record and display log changes by mac addresses

1 dpavlin 43 package html;
2    
3     sub table {
4     my $cols = shift;
5     my @td = map { "<td>$_</td>" } @_;
6     my $html = qq{<table>\n<tr>};
7     foreach ( 0 .. $#td ) {
8     $html .= $td[$_];
9     $html .= qq{</tr>\n<tr>} if $_ % $cols == 1;
10     }
11     $html .= qq{</tr>\n</table>};
12     }
13    
14 dpavlin 72 sub tabs {
15     return unless @_;
16     my $html = qq{<table border=1>\n<tr>};
17     foreach my $row ( @_ ) {
18     $row =~ s{\t}{</td><td>}g;
19     $html .= qq|<tr><td>$row</td><tr>\n|;
20     }
21     $html .= qq|</table>|;
22     return $html;
23     }
24    
25    
26 dpavlin 64 sub tt {
27     qq|<tt>| . join(' ', @_) . qq|</tt>|;
28     }
29    
30 dpavlin 45 warn "loaded";
31    
32 dpavlin 43 1;

  ViewVC Help
Powered by ViewVC 1.1.26