Instead of using a well-documented, well-tested, well-deployed system, you created your own. Now you have to maintain it, update it, fix bugs, add features, and explain it to everyone who wants to use it.

That was the problem - which one? I had to delay that decision. If I was familiar enough with any of them I wouldn't even have thought of writing that module.

(Really, copying and pasting the source code of AutoLoader? It's core!)

AutoLoader doesn't support loading autosplit.al files which return an anonymous sub on require. If AutoLoader.pm were patched with the following

--- AutoLoader.pm.orig 2006-06-18 16:18:30.000000000 +0200 +++ AutoLoader.pm 2006-06-18 16:20:10.000000000 +0200 @@ -89,7 +89,7 @@ } my $save = $@; local $!; # Do not munge the value. - eval { local $SIG{__DIE__}; require $filename }; + my $ref; $ref = eval { local $SIG{__DIE__}; require $filename }; if ($@) { if (substr($sub,-9) eq '::DESTROY') { no strict 'refs'; @@ -102,7 +102,7 @@ # There is a slight risk that we could pick up the wrong f +ile here # but autosplit should have warned about that when splitti +ng. if ($filename =~ s/(\w{12,})\.al$/substr($1,0,11).".al"/e) +{ - eval { local $SIG{__DIE__}; require $filename }; + $ref = eval { local $SIG{__DIE__}; require $filename } +; } } if ($@){ @@ -113,6 +113,7 @@ } } $@ = $save; + goto $ref if ref($ref) && ref($ref) eq 'CODE'; goto &$sub; }
there would have been no need to borrow it's code other than by use. I could have written my own autoload sub, but copy & paste was quicker...

thanks for the TechnicalDebt link.
--shmem


In reply to Re^2: RFC: Templating without a System by shmem
in thread RFC: Templating without a System by shmem

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.