note
Zaxo
<p>There are several theories about how to tell when a builtin is overridable, for example if <tt>[prototype] 'CORE::foo'</tt> is defined <tt>foo</tt> is overridable. That's mostly true, but there are exceptions.</p>
<p>Here's a quick way to tell:
<code>$ perl -e'BEGIN{ *CORE::GLOBAL::use = sub{1};} use CGI qw/:standard/; print header'
Content-Type: text/html; charset=ISO-8859-1
$ </code>
The override didn't take, so [use] is what it is.</p>
<p>A simpler version:
<code>$ perl -e'use Fatal qw/use/;'
Cannot make a non-overridable builtin fatal at /usr/lib/perl5/5.8.4/Fatal.pm line 108.
BEGIN failed--compilation aborted at -e line 1.
$ </code>
Unfortunately, [cpan://Fatal] uses the defined prototype rule to decide that.</p>
<div class="pmsig"><div class="pmsig-82147">
<p>After Compline,<br/>Zaxo</p>
</div></div>
491162
491162