syntax - Perl postfix 'use'? -


i've encountered syntax:

begin { ipc::shareable->use }; 

why? part of module contributed to, snippet:

package a; use a; use ipc::shareable; use base 'c'; 

the author changed to:

package a; use a; begin { ipc::shareable->use }; use base 'c'; 

tried asking him, yet response. questions are:

  1. why using begin in case? isnt use statement similar to:

    begin { require ipc::shareable; ipc::shareable->import(); }

  2. why ipc::shareable->use instead use ipc::shareable; ?

at guess, universal::require has been loaded @ point. module allows use called method.

universal::require used have worrying bugs, of 0.17 should ok. however, trust module::runtime more universal::require.

why did author make change? there several reasons, seems fact use method provided universal::require doesn't die if module unavailable.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -