Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Convenient way to use 5.10 features in perldebugger?

by james2vegas (Chaplain)
on Aug 15, 2010 at 17:29 UTC ( [id://855153]=note: print w/replies, xml ) Need Help??


in reply to Convenient way to use 5.10 features in perldebugger?

Or,
  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' }"

Now perl -de0 will let you the new features.

Replies are listed 'Best First'.
Re^2: Convenient way to use 5.10 features in perldebugger?
by LanX (Saint) on Aug 15, 2010 at 17:37 UTC
    Thanks, good suggestion to generally enable all features! :)

    Actually I was looking for a switch to change interactively on demand, which doesn't include changing the source ... still grateful for any suggestions! :)

    Cheers Rolf

      Well, it isn't really changing the source, just having a local version of it, and if you have it in your PERL5LIB, enabling or disabling it is just a matter of setting or unsetting PERL5DB. Also worth noting is this is not limited to just enabling 'features' but you can add modules you use a lot in debugging (Data::Dumper, YAML, JSON, etc), or subs you write yourself.
        I really appreciate your suggestion, but don't you think there should be an easier approach?

        And if not shouldn't it be a feature request?

        I tried to experiment with the < command but it seems I don't really understand how they work ...

        Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://855153]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found