On 3/12/2012 9:55 AM, David Mertens wrote: > > Second, there's no reason you couldn't have a Module.pm file that is > edited by any sort of script at build time, and in which you have > special placeholders. This might lead to a codebase that is more > legible than the standard heredoc-based .pm.PL files. > > ------------%<------------Module.pm------------%<------------ > > =head1 NAME > > Module.pm - my fancy module! > > =cut > > sub boring_function { > # blah > } > > ## BEGIN_DYNAMIC_CONTENT_FANCY_FUNCTION > > # Stuff in here gets replaced with code generated during the build phase > sub fancy_function { > die "This function is dynamically generated!\n" > . "You must build this module using the standard Perl > Makefile.PL process."; > } > > ## END_DYNAMIC_CONTENT_FANCY_FUNCTION > > ------------>%------------>%------------
This seems clearest to me, by far. > > This is Perl, so there are (too?) many ways to do it. :-) > > Too many? TOO MANY? That's like saying there are too many ways to apprehend the divine.