in reply to Re: Debugging globjects/globs
in thread Debugging objects
Example
$ perl -de 1 Loading DB routines from perl5db.pl version 1.37 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. main::(-e:1): 1 DB<1> x use IO::All; use Data::Dump::Streamer; sub dd { Dump(@_); () +; } 0 0 DB<2> x our $banana = io('2.txt'); 0 IO::All::File=GLOB(0x16af5fc) -> DB<3> x dd $banana my ($class,$constructor,%flags,@flags); $class = 'IO::All'; $constructor = sub { package IO::All::Base; use warnings; use strict; my $self = $class->new(@_); foreach $_ (@flags) { $self->$_($flags{$_}); } $self->constructor($constructor); return $self; }; %flags = (); @flags = (); $IO_All_File1 = do{ require Symbol; Symbol::gensym }; *$IO_All_File1 = { _assert => 0, _autoclose => 1, _binary => undef, _binmode => undef, _encoding => undef, _lock => 0, constructor => $constructor, io_handle => undef, is_open => 0, mode => undef, name => '2.txt', package => 'IO::All', tied_file => undef }; bless( $IO_All_File1, 'IO::All::File' ); empty array DB<4> q $
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Debugging globjects/globs
by LanX (Saint) on Aug 23, 2017 at 22:20 UTC | |
by Anonymous Monk on Aug 24, 2017 at 06:44 UTC | |
by LanX (Saint) on Aug 24, 2017 at 12:39 UTC | |
by Anonymous Monk on Aug 24, 2017 at 18:36 UTC | |
|
Re^3: Debugging globjects/globs
by geoffleach (Scribe) on Aug 23, 2017 at 20:14 UTC | |
by Anonymous Monk on Aug 23, 2017 at 21:12 UTC |