Is this the expected behavior?
Dunno. It seems like you expect this code to work like it would in a persistent process. Are you running this as a persistent process (from a LISP-like REPL, or the debugger for instance) or are you just running the process from scratch each time?

Does require not do any syntax checking?
No it does do syntax checking.
Is there a way to force syntax checking of a 'required' module?
That depends on what you want to do. In general, just require()ing a module should work.

Is there a better way that I should be implementing runtime delegation?
That depends on the situation. During development you may want to keep the process running and only reload modules when you've changed them (keeping everything else in memory) but on deployed systems it may be better to start from scratch whenever the system is updated. And you can certainly find people who think you should do either from-scratch or run-time updates regardless.


In reply to Re: Runtime syntax checking of a 'require'ed module by Joost
in thread Runtime syntax checking of a 'require'ed module by barvin

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.