Fellow Monasterians,

I have -T in my shebang and it's complaining about a write function in Imager, but IMHO, I don't think the error has anything to do with Imager itself. This node was helpful, but not definitive. The thing that I'm confused about is that the values are hard coded or have been untainted elsewhere (and not returning any error). Here's the error:

Error executing run mode 's': Insecure dependency in open while running with -T switch at /usr/lib/perl/5.8/IO/File.pm line 70, <fh00001chicago_test.jpg> line 197.
my $image_name = 'foobar.jpg'; #from user my $upload_dir = '../clients/images'; #hard coded $self->make_thumb($image_name, $upload_dir, 'jpeg'); sub make_thumb { my $self = shift; use Imager; my ($image_name, $upload_dir, $file_exten) = @_; ........ imager stuff here .......... $image_name =~ /^(\w+)\.(\w+)$/; $image_name = $1; my $to_write = $upload_dir.'/'.$image_name.'_thumb.jpg'; #$to_write =~ /(.*)/; $to_write = $1; #this didn't help $img->write(file=>$to_write, type=>$file_exten) or $self->push_error("Cannot write thumbname because: $!"); }

What am I missing? TIA

Update: Fixed shift and added error message

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

In reply to Insecure dependency ... with -T switch by bradcathey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.