$ perl -Mstrict -Mwarnings -e 'package test; my $text = <<\TEST;
test@heredoc
TEST
print $text'
test@heredoc
####
$ perl -Mstrict -Mwarnings -e 'package test; my $text = <<\TEST;
test@heredoc
TEST
sub test_print { print $text }
package main;
use parent -norequire => "test";
test::test_print()'
test@heredoc
##
##
#!/usr/bin/env perl
use strict;
use warnings;
use pm_example_module;
pm_example_module::test_print();
##
##
package pm_example_module;
use strict;
use warnings;
my %text_blocks;
$text_blocks{en}{prolog} =<<'PROLOG';
You have received this email because something happened.
Please send feedback and suggestions to tldr@nohelp.org.
PROLOG
sub test_print {
print $text_blocks{en}{prolog};
}
1;
##
##
You have received this email because something happened.
Please send feedback and suggestions to tldr@nohelp.org.
##
##
Possible unintended interpolation of @nohelp in string at pm_example_module.pm line 8.
Global symbol "@nohelp" requires explicit package name at pm_example_module.pm line 8.
Compilation failed in require at ./pm_example.pl line 6.
BEGIN failed--compilation aborted at ./pm_example.pl line 6.