Home  |  Linux  | Mysql  | PHP  | XML
From:Chris Hall Date:Mon Aug 18 07:57:39 2008
Subject:Proposed module (pragma) 'ensure'
Having tired of run-time 'undefined subroutine' errors, I made a small
module which traps:

  -- undefined subroutines

  -- things which are exported but not defined

at compile-time.

The POD is available: <http://www.highwayman.com/perls/ensure.html>

NAME

  It has been suggested to me that since this is effectively a pragma,
  it should have an all lower case name.

  The name 'ensure' broadly captures the purpose of the pragma, but
  doesn't say much about what is ensured...

  ...advice gratefully received.

  I believe my next step is to register the namespace.

USAGE

  Packages which 'use ensure' are registered for the required checks.

  In order to trap exports which are undefined it is necessary to
  intercept 'import'.  So,

    use ensure ;

  imports 'ensure::import', and is a drop in replacement for:

    use Exporter qw(import) ;

PACKAGE

  I believe I have correctly packaged the module:

    <http://www.highwayman.com/perls/ensure-1.05.tar.gz>

  Any and all advice or other reaction gratefully received.

Chris
-- 
Chris Hall               highwayman.com
Navigate in group perl.modules at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants