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 1003323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:57:47+00:00 2026-05-16T07:57:47+00:00

I am unable to evaluate ‘modern Perl’ code inside the Perl debugger. It works

  • 0

I am unable to evaluate ‘modern Perl’ code inside the Perl debugger. It works OK when debugging the code in a file, but not from the prompt.

Minimal example:

# Activating 5-10 features with -E (it works)
$  perl -E 'say "x"'
x
# Calling the debugger with -E
# It works for infile code, but for prompt line code...
$  perl -dEbug    Loading DB routines from perl5db.pl version 1.33
    DB say "x"
    String found where operator expected at (eval 16)[/local-perl/lib/5.12.1/perl5db.pl:638] line 2, near "say "x""
    at (eval 16)[/local-perl/lib/5.12.1/perl5db.pl:638] line 2
        eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; $^D = $^D | $DB::db_stop;say "x";

(Note: the same happens with "use feature ‘:5.10’".)

Am I missing something?

  • 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-16T07:57:47+00:00Added an answer on May 16, 2026 at 7:57 am

    I found a reference to the issue here, but it’s about a year old. However, the relevant portion of the Perl source hasn’t changed since and can be seen here. Essentially, if you take a look at toke.c in the Perl source, you see the following:

    if (PL_perldb) {
        /* Generate a string of Perl code to load the debugger.
         * If PERL5DB is set, it will return the contents of that,
         * otherwise a compile-time require of perl5db.pl.  */
    
        const char * const pdb = PerlEnv_getenv("PERL5DB");
                ...
    }
    ...
    if (PL_minus_E)
        sv_catpvs(PL_linestr,
              "use feature ':5." STRINGIFY(PERL_VERSION) "';");
    

    Basically, the debugger is loaded before the -E flag is processed, so the features aren’t yet enabled when the debugger gets loaded. The gist of this is that you can’t currently use -E with the -d command. If you want to use say, switch, or any other feature from the debug prompt, you have to do it like this:

      DB<1> use feature 'say'; say "x"
      x
    

    The closest I’ve seen to a solution is:

    1. copy perl5db.pl from your PERL5LIB to either somewhere in PERL5LIB or the current directory, with a different name, say myperl5db.pl
      2. Edit myperl5db.pl to have use feature ‘:5.10’; (or just ‘state’, or just ‘say’) on the first line.
      3. Set the environment variable PERL5DB to "BEGIN { require ‘myperl5db.pl’ }"

    Which I found at PerlMonks.

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

Sidebar

Related Questions

i got this exception when i done the code given below.. Unable to evaluate
I am getting the error: Unable to evaluate expression because the code is optimized
Here is the code I made, it usually works, but sometimes fails (1 out
I am getting an error in my asp.net app that reads Unable to evaluate
Error: Unable to read data from the transport connection: A blocking operation was interrupted
I'm unable to execute the following prepared statement , PREPARE stmt FROM 'SELECT sb.id,sb.category,sb.make,sb.name,sb.pic,rs.slot
I am getting a Unable to load the requested file: default.php error in codeigniter
I'm writing a simple test page to download a text file from a browser
I have looked at many posts but unable to find an answer to my
I'm trying to debug my controller but I'm getting the error message Unable to

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.