why not just make this a patch for Fatal triggered by an option on the use line
This is an excellent idea, and one I really should have considered and mentioned in my original post. I'm very happy with the idea of a patch to Fatal; it keeps everything together, and it certainly simplifies the code.
Downsides of patching Fatal are:
- We'd be changing the behaviour of a core module, which means waiting until 5.10.1 before it's deployed, or making Fatal dual-lifed (core + CPAN).
- I'd need to get sign-off from p5p, Lionel, or both. That shouldn't be a problem for a good idea, but it does have additional administrative overhead.
- We're altering the interface of a very well-known core module to do something that it's never done before. There may be surprises there.
- The calling syntax doesn't look like a pragma, but the more I look at it the less I mind. Using :lexical I hope makes it pretty obvious what's going on.
The advantages are that it goes in the core for everyone to enjoy, my ability to reuse code in Fatal becomes much much easier, and the functionality goes in the place where I imagine most people will expect it to be.
I'll open discussions with p5p to see their thoughts. Of course, I still very much appreciate feedback on the original proposal as well.
Many thanks,
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|