Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Require Carp - doesn't

by Wiggins (Hermit)
on Dec 07, 2006 at 19:06 UTC ( #588432=note: print w/replies, xml ) Need Help??


in reply to Re: Require Carp - doesn't
in thread Require Carp - doesn't

The thread referred to is about the dynamic loading, it usefulness, and attempted optimizations. I know I use Carp; it is needed for the compile.

But what I did find (looking at code examples) is that "requiring warnings" prior solved the problem.

Tis strange that Carp doesn't complain when a dependency is not present.

Replies are listed 'Best First'.
Re^3: Require Carp - doesn't
by chromatic (Archbishop) on Dec 07, 2006 at 19:25 UTC

    This has nothing to do with Carp's dependencies (and it doesn't depend on warnings). In fact, your "fix" is actually incorrect and buggy and Steve Peters posted his comment to warn people away from doing that! It has nothing to do with dynamic loading either. It has everything to do with subroutine prototypes, as Steve explained.

    Perl hasn't loaded Carp when it tries to compile the carp() calls. Without parentheses, it has no idea how many arguments the function should take (or even if carp is a function call at all), so it warns.

    It would do that even if you weren't trying to use perlcc or Carp.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://588432]
help
Chatterbox?
[LanX]: line numbering is easy to fix with # line dircetives
[LanX]: I just wrote my first source filter, without changing the source
[LanX]: :)
[LanX]: Yesterday I made B::Concise produce a nested AoH of the optree instead of text
LanX chacka!!!
[LanX]: whats the correct way to make a perlbug report for perldoc?
[erix]: chacka

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2017-04-24 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (442 votes). Check out past polls.