Loading ...
Sorry, an error occurred while loading the content.

Using modules...

Expand Messages
  • Gordon Stewart
    Hi there - just a question that popped into my mind earlier on... When I am using perl modules, is it more economical / faster processing, to only use them
    Message 1 of 2 , Jul 30 11:57 PM
    • 0 Attachment
      Hi there - just a question that popped into my mind earlier on...

      When I am using perl modules, is it more economical / faster processing, to
      only 'use' them all at the beginning of the script, or as each instance I
      need them ?
      (i'll only need them once., on a certain condition (each time the script is
      run..)


      EG :-

      top of script

      use moduleone;
      use moduletwo;
      use modulethree;

      (if condition ){
      process data, using module one
      }

      (if condition ){
      process data, using module two
      }

      (if condition ){
      process data, using module three
      }


      OR :-

      is it better to go this way :-


      (if condition ){
      use moduleone;
      process data, using module one
      }

      (if condition ){
      use moduletwo;
      process data, using module two
      }

      (if condition ){
      use modulethree;
      process data, using module three
      }


      If the data matches one criteria, it will not match any other criteria.. -
      So is it worth while 'loading' / 'using' each module / prepare it for use -
      If its likely not to be used ??


      G.
    Your message has been successfully submitted and would be delivered to recipients shortly.