in reply to dealing with RUNTIME, COMPILE TIME and use lib ...

Switch to using equivalent code that executes at runtime.

my $version = "something from the post" unshift @INC, "/commun_path/$version/ensembl/modules"; require Bio::EnsEMBL::Registry; Bio::EnsEMBL::Registry->import;
--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^2: dealing with RUNTIME, COMPILE TIME and use lib ...
by diotalevi (Canon) on Aug 23, 2006 at 13:43 UTC

    Or run your code during compile time

    my $version; BEGIN { $version = "something from the post"; } use lib "/commun_path/$version/ensembl/modules"; use Bio::EnsEMBL::Registry;

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

      I thought about that. But then I thought that

      $version = "something from the post";

      could potentially involve all sorts of complexities that you might not want to do at compile time.

      It's certainly another alternative tho'.

      --
      <http://dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg