Re: Fwd: [rt.cpan.org #74389] Pod::Simple::Pullparser get_title should ignore X...

2012-01-25 Thread Ricardo Signes
* David E. Wheeler da...@justatheory.com [2012-01-25T15:12:03]
  Subject: [rt.cpan.org #74389] Pod::Simple::Pullparser get_title should 
  ignore X... 
  Date: January 25, 2012 12:10:00 PM PST
  Reply-To: bug-pod-sim...@rt.cpan.org
  
  With Pod::Simple 3.14.
  
  If a pod file has index entries after head:
  
  =head1 NAME
  XSome entry
  
  Pod::Simple::Pullparser get_title expands 'Some entry' in the title.  It
  seems to me that it should not, and instead should replace it with an 
  empty string.  This  behaviour is also hinted in the pod documentation.

It becomes h1NAME Some Entry/h1?  That would certainly be an error.

-- 
rjbs


signature.asc
Description: Digital signature


Re: [rt.cpan.org #74389] Pod::Simple::Pullparser get_title should ignore X...

2012-01-25 Thread David E. Wheeler
On Jan 25, 2012, at 6:00 PM, Ricardo Signes wrote:

 =head1 NAME
 XSome entry
 
 Pod::Simple::Pullparser get_title expands 'Some entry' in the title.  It
 seems to me that it should not, and instead should replace it with an 
 empty string.  This  behaviour is also hinted in the pod documentation.
 
 It becomes h1NAME Some Entry/h1?  That would certainly be an error.

No, it doesn't. Text:

 air ~ perl -MPod::Simple::Text -E 
 'Pod::Simple::Text-filter(\=pod\n\n=head1 NAME\nXSome entry)'   
 NAME 

XHTML:

 air ~ perl -MPod::Simple::XHTML -E 
 'Pod::Simple::XHTML-filter(\=pod\n\n=head1 NAME\nXSome entry)'
 
 html
 head
 title/title
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 /
 /head
 body
 
 
 h1 id=NAMENAME /h1
 
 /body
 /html

HTML:

 air ~ perl -MPod::Simple::HTML -E 
 'Pod::Simple::HTML-filter(\=pod\n\n=head1 NAME\nXSome entry)' 
 htmlheadtitleNAME Some entry/title
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 
 /head
 body class='pod'
 !--
   generated by Pod::Simple::HTML v3.19,
   using Pod::Simple::PullParser v3.19,
   under Perl v5.014002 at Thu Jan 26 03:01:45 2012 GMT.
 
  If you want to change this HTML document, you probably shouldn't do that
by changing it directly.  Instead, see about changing the calling options
to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
then reconverting this document from the Pod source.
When in doubt, email the author of Pod::Simple::HTML for advice.
See 'perldoc Pod::Simple::HTML' for more info.
 
 --
 
 !-- start doc --
 a name='___top' class='dummyTopAnchor' /a
 
 h1a class='u' href='#___top' title='click to go to top of document'
 name=NAME
 NAME !--
   INDEX: Some entry
 --/a/h1
 
 !-- end doc --
 
 /body/html

Best,

David