in reply to Re^2: RT get links
in thread RT get links

http://cpansearch.perl.org/src/DROLSKY/Moose-0.79/lib/Moose/Object.pm
sub dump { my $self = shift; require Data::Dumper; local $Data::Dumper::Maxdepth = shift if @_; Data::Dumper::Dumper $self; } 1;

Replies are listed 'Best First'.
Re^4: RT get links
by Bloodnok (Vicar) on May 29, 2009 at 11:32 UTC
    OK, point taken - Moose self-evidently isn't as paranoid about revealing its' inner workings as Object::InsideOut.

    A user level that continues to overstate my experience :-))
      Moose self-evidently isn't as paranoid about revealing its' inner workings as Object::InsideOut

      Yeah, it is exactly the opposite of the Inside-Out objects, using the meta layer of Moose that is provided by Class::MOP you can dig very deeply into the class and get all the details if you want.

      my $foo = Foo->new; my $meta_instance = Foo->meta->get_meta_instance; print join "\n" => map { "$_ => " . $meta_instance->get_slot_value($fo +o, $_) } $meta_instance->get_all_slots;
      Or, because Moose deep down is just plain old HASH based perl objects you can just do
      print Dumper $foo;
      Or as the above poster pointed out you can use the (simplistic but useful) Moose::Object::dump method
      print $foo->dump;
      But all that said, Object::InsideOut also provides a dump method that by default will do the right thing too.

      -stvn
Re^4: RT get links
by mmf (Initiate) on May 29, 2009 at 13:57 UTC
    I did use data Dumper on it and Maxdepth didn't reveal anything extra. here is what the dump is showing:
    $VAR1 = {
              'TimeEstimated' => '',
              'Status' => 'open',
              'Queue' => 'q1',
              'AdminCc' => '',
              'Requestors' => 'log@log.com',
              'Started' => 'Thu Feb 19 1:02:58 2009',
              'InitialPriority' => '40',
              'Starts' => 'Not set',
              'TimeWorked' => '',
              'id' => 'ticket/2',
              'Told' => 'Not set',
              'Cc' => '',
              'Subject' => 'test ticket',
              'FinalPriority' => '90',
              'TimeLeft' => '',
              'Creator' => 'guy',
              'Owner' => 'guy',
              'Resolved' => 'Not set',
              'Created' => 'Tue Feb 17 13:22:11 2009',
              'Priority' => '42',
              'Due' => 'Not set'
    }
    
      MIght be prudent to ask on the RT Mailing list: rt-users@lists.bestpractical.com