[pmwiki-users] Re: More on Richedit . . .

Russell Bailey russell-pmwiki at saberpunk.net
Thu Sep 22 13:59:34 CDT 2005

Richard Burnett wrote:

> One thing I noticed is that there are '^M's in some of the files,  
> specifically the wrapper.  On the system I am on, if these are in the  
> file, the shell won't load perl and send the script to it on it's  
> own.  I pulled those out and now it at least runs the script.
> I just tried running the Wrapper perl script by hand, it tells me  
> that dialect is missing an argument or something like that.  I don't  
> get any errors from the use statements, but I am thinking with perl,  
> if I remember correctly, don't you only get errors if you try and use  
> anything in the files modules?
> I guess what I am asking is what is the best way to test for the  
> modules.
Here's something I threw together which should test things out for you.  
Place it in the same directory as the WikiConverter script,  give it 
execute permissions,  and run it:

use HTML::Entities;
use HTML::TreeBuilder;
use URI;
use vars '$VERSION';
use WikiConverter;
$VERSION = '0.30';

 print "Content-type: text/html\n\n";
 print "Hello World.<br/>";
 $SIG{'__DIE__'} = sub { print @_; };
 $html = "<h1> Header 1</h1>    <h2> Header 2</h2>    Here is some 
text.  Here is some <strong>bold text</strong>. Here is some <em>italic 
text</em>.    <h2> Header 2 (rerun 1)</h2> <h2> Header 2 (rerun 2)</h2>";
 print "Intialize...<br/>";
 my $wc = new HTML::WikiConverter( dialect => 'PmWikiEnhanced' );
 print "Parse...<br/>";
 print $wc->html2wiki( $html );
 print "Done.<br/>"

More information about the pmwiki-users mailing list