in reply to Image::Thumbnail work under windows but not on linux

I'd be very interested to hear why you have decided to use neither strict nor warnings nor taint mode.

sub createImageMagickThumb { my $filename = shift || ''; my $t = new Image::Thumbnail( size => 55, create => 1, input => '$imgdir/$filename', outputpath => '$imgdir/thumb.$filename', ); print "Content-Type: text/html\n\n"; print "outputpath => '$imgdir/thumb.$filename'"; }

As is plain from the above, your use of single quotes in the arguments to Image::Thumbnail->new means that the paths will not be interpolated. I would go so far as to suggest that this code, as written, isn't doing what you think on windows either.

Replies are listed 'Best First'.
Re^2: Image::Thumbnail work under windows but not on linux
by holli (Abbot) on Aug 14, 2019 at 09:07 UTC
    I'd be very interested to hear why you have decided to use neither strict nor warnings nor taint mode.
    Because this guy is just another unteachable cargo culter.


    holli

    You can lead your users to water, but alas, you cannot drown them.
Re^2: Image::Thumbnail work under windows but not on linux
by jcb (Parson) on Aug 15, 2019 at 02:31 UTC

    On a side note, the default <code> font makes distinguishing single and double quotes rather difficult here; any advice on something to add to my custom CSS in display settings to make it more readable? I like the reduced type size for code, but the " looks almost exactly like a bold ' (') here.

      As haukex wrote, the monospace font is set in your browser config. However, there is one setting here which may help. In Display Settings, in the Code Listing Settings there is an option "Large Code Font" which, if checked, will increase the font size of the code listings without changing the font face. That might be all you need?

        I tried the "Large Code Font" option, which does increase the font size, but I prefer the smaller code font.

        On a side note, all "Large Code Font" does is suppress a <font size="-1"> tag around the code block. If you prefer CSS, the text in large code blocks can be matched with tt.codetext and inline code text can be matched with tt.inlinecode. Since the <tt> tag overrides the font-family, matching the outer p.code is not useful here.

        Bizarrely, if you want to use CSS to customize this, you will need to check "Large Code Font" — otherwise the <font> tags will override your careful efforts.

      PM doesn't seem to enforce any font on its <pre> tags, so it should be using whatever is the default fixed-width font in your browser, so you should be able to change it in your browser's settings. If you're on Windows, I like the new "Consolas" font, and on Ubuntu, "Ubuntu Mono" isn't bad.

        Thanks! Changing the default font solved the problem.