legLess has asked for the wisdom of the Perl Monks concerning the following question:
I'm developing a web site using templates. Some time ago I created a small script to parse a template file, suck up all the template VARiables and IFs, and spit them out into a nicely formatted template assignment, kinda like this:
This makes it very easy to (a) make sure I get all the template variables the first pass, and (b) paste this block into the script and fill in the blanks. I'm using a format to make sure the "=> ," lines up correctly, which makes it easier to read and edit.$template->param( THIS_IS_A_LONG_VARIABLE_NAME => , ANOTHER => , YOU_GET_THE_IDEA => );
Today I decided that the whole operation just took too damn long, so I've been fiddling with the Win32::Clipboard (won't work in Debian, sadly ;). It all works nicely except for the format, because I'm ".=" assigning to a variable, then setting the clipboard to that variable. I figure I have two options:
Thanks!
P.S. For those who haven't used Win32::Clipboard, it's pretty simple. Here's the code that does stuff:
$clipboard = Win32::Clipboard(); $clipboard->Set( $temp );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 'WRITE'ing a format to a scalar
by runrig (Abbot) on Aug 03, 2001 at 20:08 UTC | |
by legLess (Hermit) on Aug 03, 2001 at 20:38 UTC | |
|
Re: 'WRITE'ing a format to a scalar
by John M. Dlugosz (Monsignor) on Aug 03, 2001 at 20:38 UTC | |
by legLess (Hermit) on Aug 03, 2001 at 20:40 UTC | |
by runrig (Abbot) on Aug 03, 2001 at 22:50 UTC | |
by John M. Dlugosz (Monsignor) on Aug 04, 2001 at 00:19 UTC |