perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject RE: Text to HTML recipe making
Date Wed, 21 Dec 2005 04:17:46 GMT
> > 
> > Unfortunately there are a few lines of C code missing to get this 
> > done. It was always my intention to make such a usage 
> possible, but I 
> > didn't got around until now to implement the last piece :-(
> 
> Ah.  Does this mean that you have now done it?  (Sorry, I 
> notice that German-speakers tend to have problems with using 
> the word "until"
> correctly)
> 

No it's not done. 

Just to make it right the next time, what would be the correct word instead
of "until" in this case?

> > to AddInitCode you would pass some code like:
> > 
> > q{
> > 
> >  use HTML::TextToHTML ;
> > 
> >  {
> >  local $/ = undef ;
> >  my $text = <DATA> ;
> >  
> >  my $html =  HTML::TextToHTML::<whatever you want to do> ($text) ;  
> > print OUT $html ;  }
> > 
> >  __DATA__
> > 
> > }
> 
> Ah, so this would make the rest-of-the-file the __DATA__ to 
> be read and processed. 

Yes

> Interesting!  I'm not entirely sure 
> whether this would work, since HTML::TextToHTML already makes 
> use of the DATA handle to read in its own configuration -- I 
> can't remember what happens with multiple __DATA__ sections 
> in different files.
> 

There should be no problem, since Perl can handle multiple __DATA__ in
different files

Gerald


 
** Virus checked by BB-5000 Mailfilter ** 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message