I created a module from the Template::Provider::HTTP writeup
in the Badger book.
I'm also using it as prescribed:
use Template::Provider::HTTP;
our $http_provider = Template::Provider::HTTP->new(
ABSOLUTE=>1
);
our $file_provider = Template::Provider->new(
INCLUDE_PATH => $config{template_dir}
);
$tt = Template->new({
LOAD_TEMPLATES => [$file_provider,$http_provider],
PREFIX_MAP => {
http => 1,
default => 0,
}
});
In my template, I have an
[% INSERT http://www.bls.gov/include/cps/cps2_latest.txt %]
Before I put ABSOLUTE=>1 in the HTTP constructor, it complained about
absolute paths.
Now I get:
file error - //www.bls.gov/include/cps/cps2_latest.txt: No such file or
directory
Note that it there is no 'http:' which seems to mean that it is using the
fetch() method from the file provider instead of the HTTP provider, which
(supposedly) tacks the http: back on.
If you can provide any assistance tracking this one down I'd appreciate it.
--
Mark Thomas
_______________________________________
BAE SYSTEMS Information Technology
2525 Network Place
Herndon, VA 20171 USA
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates