given a directory where 1 or more perl modules are installed [...], is there a way to determine what version of perl [...] was used to install those modules?

For pure-perl modules, no, because the installation process essentially just copies the module from the source / unpacked archive directory. The installing perl does not leave any "fingerprints".

For XS-based modules, partially. The Perl part is copied as before, so again, no "fingerprints". The C library generated from XS is compiled code, and even when stripped, you should still be able to find some traces in the binary:

>strings /usr/lib64/perl5/vendor_perl/auto/DBI/DBI.so|sort -u|grep -i +perl Note: perl is running without the recommended perl -w option PERL_DBI_XSBYPASS PerlIO_open PerlIO_printf PerlIO_puts PerlIO_vprintf Perl_PerlIO_close Perl_PerlIO_flush ... a lot of matches omitted here ... Perl_sv_upgrade Perl_taint_proper Perl_warn_nocontext Perl_warn_sv Perl_xs_boot_epilog Perl_xs_handshake >

Well, no version here, but because the XS API changed over time, you should at least be able to elimitate some older versions. E.g. I guess PerlIO functions weren't available in 5.005.

Let's be a little bit smarter and search for a digit followed by a dot:

>strings /usr/lib64/perl5/vendor_perl/auto/DBI/DBI.so|sort -u|grep '[[ +:digit:]]\.' 1.636 GCC: (GNU) 5.3.0 GLIBC_2.2.5 GLIBC_2.3 GLIBC_2.3.4 GLIBC_2.4 bind_col: column %d is not a valid column (1..%d) v5.22.0 >perl -v This is perl 5, version 22, subversion 2 (v5.22.2) built for x86_64-li +nux-thread-multi Copyright 1987-2015, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge. >perl -MDBI -E 'say $DBI::VERSION' 1.636 >

That looks about right.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^5: "symbol lookup error" message help by afoken
in thread "symbol lookup error" message help by Special_K

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.