On Wed, Aug 23, 2000 at 04:32:43AM -0000, Perl6 RFC Librarian wrote:
> =head1 TITLE
> 
> One Should Not Get Away With Ignoring System Call Errors
>
> =head1 ABSTRACT
> 
> =head1 EXECUTIVE SUMMARY
> 
> If something fails, you should care.
> 
> =head1 DESCRIPTION
> 
> The 'strict' pragma (or whatever form it takes in perl6) should
> include in its 'default set of strictness' a new subpragma, 'system'.
> This subpragma has the following semantics:

This has already been done, or can be done, without core changes.
Mostly.  

Fatal.pm can cause failing system calls to kill the program, it simply
remains to put a wrapper around it which imports all the system
functions.  That's one part.

Dunce::Files detects the use of system/file functions in void context
(the underlying module lets any function do the same) and causes the
program to die.  That's the other part.

The only real distinction is that Dunce::Files acts at runtime,
whereas your RFC implies a compile time check.  Also, the wrapper
functions exported to check for void context *may* impose an
efficiency penalty.

Still, we've got 80% of the functionality without a core patch.


PS  Dunce::Files isn't on CPAN yet.  I'll fix it up tonite.

PPS This reminds me about something else involving $! and $@ to get
around the conundrum which Peter Scott brought up about checking the
return value not necessarily being error handling.

-- 

Michael G Schwern      http://www.pobox.com/~schwern/      [EMAIL PROTECTED]
Just Another Stupid Consultant                      Perl6 Kwalitee Ashuranse
A tickle of paste
Teases down my sweaty thigh
Oh, plug it again!
        -- ignatz

Reply via email to