in reply to Re^2: Templating pod generation?
in thread Templating pod generation?
Ah, right.
for my $nm ( qw( io fm cv hv pvlv gv av bm pvmg pvnv pviv rv nv iv pv +sv ) ) { my $nm_pkg = "B::$nm"; *{ $nm } = sub { local *__ANON__ = $nm; my $op = shift @_; return blessed( $op ) and $op->isa( $nm_pkg ); } }
As for the POD, think about it: the POD processor is just reading the file. How would it know where to look for what gets seen by the perl compiler at one stage or other when the file is compiled? (Short of solving the halting problem, anyway…) It would have to invoke the compiler on the file and then somehow hook into eval, which isn’t trivial, since CORE::eval has a variable prototype, and it certainly wouldn’t be very safe. So to cover such cases there would have to be some form of templating built into POD itself. And while it might be worthwhile to think about that, that won’t solve your problem.
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Templating pod generation?
by diotalevi (Canon) on Jul 19, 2006 at 15:54 UTC | |
by chromatic (Archbishop) on Jul 19, 2006 at 21:22 UTC | |
by Aristotle (Chancellor) on Jul 19, 2006 at 17:11 UTC | |
by diotalevi (Canon) on Jul 19, 2006 at 19:32 UTC |