[Dbix-class] Insecure dependancy in DBIx::Class::Schema

Jay Bowers abeljaybowers_lists at yahoo.co.uk
Fri Jun 23 16:11:53 CEST 2006


Hi All,

Following on from a conversation that was had on IRC...

When running an application that I had written with perl taint checking
turned on (-T switch) I found that I was getting the error:

"Insecure dependency in eval while running with -T switch
at /usr/lib/perl5/site_perl/5.8.6/DBIx/Class/Schema.pm line 266."

The problem was that if you don't provide any argument names to
DBIx::Class::Schema->load_classes it tries to use
Module::Find::findallmod to find them for you, unfortunately all the
class names that it finds are tainted so when it gets to auto load them
in an eval later in the code, every thing dies.

The fix was to pass the class names that I wanted loading in, for
example:

__PACKAGE__->load_classes(qw/ Foo Bar /);

Attached is a patch to the Troubleshooting pod to help anyone else who
comes up against this problem.

HTH,

Jay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbix-class-insecure-dependancy-doc.patch
Type: text/x-patch
Size: 537 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20060623/62d39afe/attachment.bin 


More information about the Dbix-class mailing list