Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1029899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:37:04+00:00 2026-05-16T12:37:04+00:00

I ran this test script: use strict; use warnings; use Test::More tests => 3;

  • 0

I ran this test script:

use strict;
use warnings;
use Test::More tests => 3;
use Carp;

ok(1<2);
pass();
fail();
croak "example";

using the command line prove -MCarp=verbose -v foo.pl, and got the following errors:

Subroutine App::Prove::verbose redefined at /opt/ActivePerl-5.12/lib/App/Prove.pm line 407
        App::Prove::_load_extension('App::Prove=HASH(0x683718)', 'Carp=verbose') called at /opt/ActivePerl-5.12/lib/App/Prove.pm line 419
        App::Prove::_load_extensions('App::Prove=HASH(0x683718)', 'ARRAY(0x683850)') called at /opt/ActivePerl-5.12/lib/App/Prove.pm line 481
        App::Prove::run('App::Prove=HASH(0x683718)') called at /opt/ActivePerl-5.12/bin/prove line 11
Undefined subroutine &Carp::verbose called at /opt/ActivePerl-5.12/lib/App/Prove.pm line 484.

If I run it using perl -MCarp=verbose foo.pl there’s no problem. What is causing prove to reject verbose Carp? How can I get a full callstack from my tests when they croak without global replacing croak to confess?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:37:04+00:00Added an answer on May 16, 2026 at 12:37 pm

    prove -M does not appear to be equivalent to perl -M. It appears to load a prove extension, not load a module into your tests. The docs are totally unclear on this point, but the code in App::Prove is not. So prove -MCarp=verbose imports Carp::verbose into App::Prove causing the problem above.

    A simple way to do what you want is to use the PERL5OPT environment variable plus Carp::Always which will turn all warns and dies (and carps and croaks) into stack traces.

    PERL5OPT=-MCarp::Always prove ...
    

    This has the added benefit of working in any situation, with or without prove.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a convoluted example so bear with me: I have a script that
G'day, I was using Test::Class perl module for some testing recently and ran into
This has been driving me nuts for hours now. Consider the following test script
I am unable to find out more about this default parameter that I ran
I am just learning how to use perl hashes and ran into this message
I ran this query in my database : SELECT DB_NAME(dbid) as DBName, COUNT(dbid) as
I ran this persons code. It worked as a main but when i put
I ran this sql query in my database: update payments set method = 'paysafecard'
This loop is strange. I ran this in Java, it gives an Index out
I just installed python2.6 parallel to my python2.4. I ran this command ln -s

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.