Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Require Carp - doesn't

by idsfa (Vicar)
on Dec 07, 2006 at 17:20 UTC ( #588400=note: print w/replies, xml ) Need Help??


in reply to Require Carp - doesn't

Did you Super Search? Steve_p just wrote about this.


The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Replies are listed 'Best First'.
Re^2: Require Carp - doesn't
by Wiggins (Hermit) on Dec 07, 2006 at 19:06 UTC
    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.

      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://588400]
help
Chatterbox?
[Yaerox]: I feel like i'm not seeing the forest for the trees. Can someone give me a hint how to research converting all kinds of files into ansi? If origin file is utf8 convert to ansi, is origin file is ansi then skip file.
[1nickt]: Yaerox probably best to whip up an SSCCE demonstrating the failure in what you have now and post to SoPW as a question.
[Corion]: Yaerox: That's a somewhat hard problem. Encode solves the conversion part, but for guessing what encoding a file is in, that's the hard part
[Corion]: Yaerox: There is Encode::Guess, but that needs a limited set of inputs, and it also cannot handle multiple single-byte encodings

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-03-28 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (331 votes). Check out past polls.