in reply to Templating pod generation?

From CB conversation, it seems like you want this file to modify itself, generating the pod and methods. That is an evil desire.

Ok, here's an evil thought to go with it.

use Tie::File; tie my @file, 'Tie::File', $0 or die $!; splice @file, $begin_lineno, $begin_length, split $/, eval <<B_SUGAR; # etc.
I wouldn't do it ;-)

Every time I look at this, I see something more that needs doing to make it work. That's a bad sign. Take this a purely conceptual notion.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Templating pod generation?
by diotalevi (Canon) on Jul 19, 2006 at 19:35 UTC

    I don't really want to have the file modify itself. That'd suck because people wouldn't expect it. I'd just like it to expand itself when looked at like a BEGIN block can do for perl code or macros do for lisp code. From other responses in this thread it looks like I'll have to stick with a separate template that just generates the pod and perl. It's not as nice but not difficult either. I just wanted the nicest possible world.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

      That notion makes source filters look good, doesn't it? Quite an accomplishment, in a wicked kind of way ;-)

      After Compline,
      Zaxo