more useful options | |
PerlMonks |
Automagically indenting (implementation, code)by deprecated (Priest) |
on May 11, 2001 at 06:25 UTC ( [id://79631]=perlquestion: print w/replies, xml ) | Need Help?? |
deprecated has asked for the wisdom of the Perl Monks concerning the following question:
Please reference the code on my home node for details on what I am doing here.
I am making pretty extensive use of heredocs to fit VRML into scalars. I then take these scalars and pass them to parent scalars. These scalars are called, in the VRML terminology, 'Nodes'. So lets look at this code: You'd be surprised just how well this works. Let's extrapolate this a little further though. While this may produce PML (PoopModellingLanguage) correct code, it is also ugly and difficult to read: I am hoping to put this to the monastery as something akin to the HTML::Pretty (or was that CGI::Pretty?) module. I would like to be able to prettify the output of my code (optionally) so that it is easier to read for VRML hackers when they get to reading it. I think probably a regular expression would be able to embody rules like this:
thanks for your help everyone,
ps. and isnt this more productive than golf? working together on a project? and just as fun? --
Back to
Seekers of Perl Wisdom
|
|