GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BFD(3) User Contributed Perl Documentation BFD(3)

  BFD - Impromptu dumping of data structures for debugging purposes

   my $scary_structure1 = foo();
   my $scary_structure2 = bar();
   use BFD; d $scary_structure1, " hmmm ", $scary_structure2, ...;
   ....

Allows for impromptu dumping of output to STDERR. Useful when you want to take a peek at a nest Perl data structure by emitting (relatively) nicely formatted output with filename and line number prefixed to each line.

Basically,

    use BFD;d $foo;

is shorthand for

    use Data::Dumper;
    local $Data::Dumper::Indent    = 1;
    local $Data::Dumper::Quotekeys = 0;
    local $Data::Dumper::Terse     = 1;
    local $Data::Dumper::Sortkeys  = 1;
    my $msg = Dumper( $foo );
    $msg =~ s/^/$where: /mg;
    warn $msg;

I use this incantation soooo often that a TLA version is warranted. YMMV.

Uses Data::Dumper, which has varying degrees of stability and usefulness on different versions of perl.

Barrie Slaymaker <barries@slaysys.com>

Copyright (c) 2003, Barrie Slaymaker. All Rights Reserved.

You may use this software under the terms of the GNU Public License, the Artistic License, the BSD license, or the MIT license.

Good luck and God Speed.

2004-03-10 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.