I have a Perl program that reads a bunch of data, processes it, and then outputs several different file formats. I would like Perl to be one of these formats (as a .pm package) and allow people to use overloaded data in their own Perl scripts.
Printing data is easy with Data :: Dump :: pp .
I would also like to print some helper functions for the resulting package.
What is an easy way to print a multi-line string without changing variables?
I would like to be able to:
print <<EOL;
sub xyz {
my $var = shift;
}
EOL
But then I have to run away from all $ .s
? , - - ? .