Typing HTML tags in pod 
Author Message
 Typing HTML tags in pod

I'm building a module that involves HTML, so I need
to put HTML tags in the pod sections.

I need the pod to show <table> and so on.

I read perldoc perlpod and I see I can do it if I type:

E<gt>

but it's simply not working for me. And keeping the < tags
looks is messing with B<bold> tags I need to use.

I'm trying to put the tag in a simple file
=head2

E<gt>

=cut

and it does work. This is 5.005_03 and upgrading is a nono.

What can I do ?
Thank you very much.

--
 - frankie -



Sun, 17 Aug 2003 20:27:17 GMT  
 Typing HTML tags in pod

Quote:

>I'm building a module that involves HTML, so I need
>to put HTML tags in the pod sections.

Well, I've never done it myself, but according to perlpod the following
should work:

=pod

=head1 THIS SECTION CONTAINS HTML

=begin html

<table>
  <tr><td>top left</td><td>top right</td></tr>
  <tr><td>bottom left</td><td>bottom right</td></tr>
</table>

=end html

=cut

--
Ilmari Karonen - http://www.sci.fi/~iltzu/
'"Intuitive" in this situation can generally be translated as "Try the 100
 most likely commands.  None of them will work, but you'll kick yourself
 when you find out what you should have typed."'  -- Charles Miller in SDM



Sun, 17 Aug 2003 23:18:12 GMT  
 Typing HTML tags in pod

Quote:

> I'm building a module that involves HTML, so I need
> to put HTML tags in the pod sections.

I've been doing a bit of this lately, and have found that '=for html'
does the job, if sort of a kludge.  In the paragraph following that
construct any html can be included, e.g.,

    =for html
      <center><img src="someimage.png" alt="image"/></center>

The =begin construct might also be used in the same way, and wouldn't
require all the html to be in a "paragraph".

The pod translator, e.g., pod2html should handle these sections appropriately,
and others, e.g., pod2text should ignore them.

Hope this helps.

Ken

--



Mon, 18 Aug 2003 05:50:58 GMT  
 Typing HTML tags in pod
Quote:


> >I'm building a module that involves HTML, so I need
> >to put HTML tags in the pod sections.

> Well, I've never done it myself, but according to perlpod the following
> should work:

> =pod

> =head1 THIS SECTION CONTAINS HTML

> =begin html

I'm sorry I didn't explained well . I'm not english.
What I meant to say was that I need the html tags to
be shown when someone does perldoc TheModule.

Instead of producing some html in the web, the programmer
must be able to see this tags as source html.

For example:

$ perldoc MyModule

This modules will blah blah

<table>
 blah blah
</table>

If I do =begin HTML this HTML is hidden in the pod.

Just issuing the html makes the pod a litle corrupt so I
wanted to use E<gt> tags. But they are not parsed, but
shown as written. And the same happens with B<hi> and so on.

This doesn't happen with small test files. I guess that is
produced by the big amount of HTML tags shown. So I wonder
what will be the best way to show this HTML source in the pod.

--
 - frankie -



Mon, 18 Aug 2003 20:29:19 GMT  
 Typing HTML tags in pod

Quote:

> I'm sorry I didn't explained well . I'm not english.
> What I meant to say was that I need the html tags to
> be shown when someone does perldoc TheModule.

I think it's easiest if you just indent the HTML a bit.  That is, the
following will fail:

<html><title>foo</title></html>

But if you have whitespace before the line, then it is printed
verbatim in the output:

    <html><title>foo</title></html>

Does this work?

kai
--
Be indiscrete.  Do it continuously.



Mon, 18 Aug 2003 23:06:12 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Delphi - Access + WEB

2. Using HTML Tags in forms (Content Type)

3. how to use pod::html and pod::text

4. Help with POD and Pod::Html

5. Q: Optimizing SQL

6. Need for script which looks file and replaces HTML tags with WML tags

7. Parsing HTML Tag by Tag/ Local links to remote

8. Pascal Question

9. OutPut Of An Integer In Graph Mode ...

10. Removing HTML tags with HTML::Parser - my code is bloated

11. How to keep html tags with HTML::Tokeparser

 

 
Powered by phpBB® Forum Software