in reply to Interpolate Perl variables in POD
As JavaFan and GrandFather have already mentioned, no, you can't directly. However, there's nothing to stop you from generating a POD document from a perl script:
open (my $pod, '>', 'filename.pod') or die "Can't write pod file: $!"; my $my_perl_variable = 'something'; print $pod <<EOF; =head1 Imaginary Interpolation This was defined previously: C<$my_perl_variable> =cut EOF
Of course, this would mean that you'd have to trigger the re-writing process somehow ... if you were to give an interface for updating whatever your variables were, you could regenerate the pod afterwards. I personally couldn't see the advantage of doing this, but I don't know what your full intentions are.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Interpolate Perl variables in POD
by repellent (Priest) on Oct 01, 2008 at 01:12 UTC | |
by GrandFather (Saint) on Oct 01, 2008 at 01:29 UTC | |
|
Re^2: Interpolate Perl variables in POD
by snoopy (Curate) on Oct 01, 2008 at 06:30 UTC |