Apologies, but it appears you have posted my code incorrectly in the very first part of your post. Particularly, at the alleged $s->(). I am not sure how key this is to your assertion my code is not strict-compliant .

I have re-read what I posted and cannot find where I ever call $s as the object or class. I call $s as a method to $caller, ie $caller->$s.

In any case, I have a close relative of the code I posted running fine under strict:

$$database_handle = DBI->connect(( map { my $s="database_$_"; exists $arguments{$_} ? $arguments{$_} : $caller->$s() } (qw(data_source_name username password)) ), {Taint=>$arguments{taint}||$caller->database_ta +int} ) or die "Could not connect to the database: $DBI:: +errstr" unless defined $$database_handle;

Please note $$database_handle is not meant to be a symbolic reference. You would need to see the whole module. $database_handle is a reference to a reference (to a handle), which I create earlier in the method because the particular reference (handle) used depends on whether the method is called on a class or an object.

Thanks for the rest of your post -- I will read it over. But, again, no problems with stricture!


In reply to Re: Re: Double quoted string as method call by ryantate
in thread Double quoted string as method call by ryantate

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.