I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-06-29 21:39:11-07 by rsthacker in response to 5578
Re: Documentation for direct use of modules
The $text argument contains the text to be parsed. The $filename argument should probably be renamed to something like $source, since it is only used to carry around the source information for generating error messages. Since the original use from prest involved only sources that were read from a file, it was called $filename. In general, it would be better for the Parse routine to allow you to pass in a line number too, so the real argument list should be
Parse($some_text, "my data file", 166)
to help people determine how to find where any parsing errors originated.

The command line options hash is just what Getopt::Long::GetOptions would return with the argument qw(d+ e:s h w=s D:s% W:s% V). In other words, if you were to invoke
prest -D include-path='<.>':/my/path -D perl-path=/my/path:'<inc>' -D image-exts=.fig=.png,.dot=. +png,.ai=.png -D trusted -w latex my_file.rst
you would define
%opt = (D => {'include-path' => "include-path='&lt;.>':/my/path", 'perl-path' => "perl-path=/my/path:'&lt;inc>'", 'image-exts' => 'image-exts=.fig=.png,.dot=.png,.ai=.png', trusted => 1 }, w => 'latex');
Direct Responses: Write a response