Subject: | Backend warnings and UrlEncoded test fix |
If Any::Renderer is installed on a fresh system many of the modules the
provided backends use do not exist.
The warning thrown by the module are nice to see the first time but get
annoying if you don't install all the dependencies. If I never use the
Template option, I shouldn't have to install those modules if
Any::Renderer can work without it.
I purpose handling the loading of backends quietly and provide functions
to access any errors.
failed_backends() returns a listref of backends that did not load.
failed_backend_message($file) return any error message for a particular
backend
I've made these changes and have them available to view here:
https://github.com/kmcgrath/Any-Renderer
Also I updated a UrlEncoded test that was failing on install.
The following warnings are thrown every time the module checks for
available formats on a fresh install:
Any::Renderer - problem loading backend module: Can't locate
Data/Serializer.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl /usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0 .) at
/usr/local/share/perl/5.10.1/Any/Renderer/Data/Serializer.pm line 7.
BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Any/Renderer/Data/Serializer.pm line 7.
Compilation failed in require at (eval 7) line 3.
Any::Renderer - problem loading backend module: Can't locate
Any/Template.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl /usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0 .) at
/usr/local/share/perl/5.10.1/Any/Renderer/Template.pm line 7.
BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Any/Renderer/Template.pm line 7.
Compilation failed in require at (eval 9) line 3.
Any::Renderer - problem loading backend module: Can't locate
Cache/AgainstFile.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl /usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0 .) at
/usr/local/share/perl/5.10.1/Any/Renderer/XSLT.pm line 6.
BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Any/Renderer/XSLT.pm line 6.
Compilation failed in require at (eval 11) line 3.
Any::Renderer - problem loading backend module: Can't locate
Hash/Flatten.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl /usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0 .) at
/usr/local/share/perl/5.10.1/Any/Renderer/UrlEncoded.pm line 8.
BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Any/Renderer/UrlEncoded.pm line 8.
Compilation failed in require at (eval 39) line 3.
Any::Renderer - problem loading backend module: Can't locate
Data/JavaScript/Anon.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl /usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0 .) at
/usr/local/share/perl/5.10.1/Any/Renderer/JavaScript/Anon.pm line 7.
BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Any/Renderer/JavaScript/Anon.pm line 7.
Compilation failed in require at (eval 40) line 3.
Any::Renderer - problem loading backend module: Can't locate
Data/JavaScript.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl /usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0 .) at
/usr/local/share/perl/5.10.1/Any/Renderer/JavaScript.pm line 7.
BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Any/Renderer/JavaScript.pm line 7.
Compilation failed in require at (eval 41) line 3.