in reply to Very weird bug - insight would be helpful

That makes sense, thanks!!

So the eval at C:/Perl/site/lib/RTF/Tokenizer.pm line 170 just left this error lying around in $@:
Can't call method "isa" without a package or object reference at C:/Perl/site/lib/RTF/Tokenizer.pm line 170.
?

So good practice would be to always go $@ = '' after a failed eval?
or use local $@?

Should I report this as a bug to the Tokenizer.pm maintainer?

Replies are listed 'Best First'.
Re^2: Very weird bug - insight would be helpful
by choroba (Cardinal) on Nov 19, 2013 at 16:38 UTC
    Good practice is to use Try::Tiny, or at least
    eval { # Code that might die. 1; } or { # Handle the exception. }

    BTW, check whom you are replying to.

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      Thanks!

      Try::Tiny sounds good, I'll use that in my code.

      Please can you answer these questions if possible (to help my Perl indoctrination ;) )

      1. Would going $@ = '' after a failed eval work?
      2. Would use local $@ also work?
      3. Should I report this as a bug to the Tokenizer.pm maintainer?

      BTW, check whom you are replying to.
      I normally (almost always) use the "Comment on" link just under the OP.
      I'm not used to forums where you can reply to individual posts, most of the forums I use just allow you to add a new post to the end of the topic. Also I find I sometimes miss new comments that are added as replies to earlier comments.
      Is using the "Comment on" link OK? Or is using the reply-to-comment link preferred?
        See the "Background" section in Try::Tiny for details on problems with eval.

        Reply-to-comment is prefered as it informs the author of the comment you reply to.

        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ