Karen:
Thank you for looking into this and creating this PM. Here's the dump of
the object as requested and the full stack trace.
MyApp::Collection::System is a subclass of Meerkat::Collection. Let me
know if you have any questions or I can perform an additional tests.
Todd
Object (1) does not have a &pack method, cannot collapse$VAR1 = bless(
do{\(my $o = 1)}, 'JSON::PP::Boolean' );
at /usr/local/share/perl/5.18.2/MooseX/Storage/Engine.pm line 208.
MooseX::Storage::Engine::__ANON__(JSON::PP::Boolean=SCALAR(0x4ff0f68),
HASH(0x4d047e8)) called at
/usr/local/share/perl/5.18.2/MooseX/Storage/Engine.pm line 280
MooseX::Storage::Engine::__ANON__(HASH(0x647a530), HASH(0x4d047e8)) called
at /usr/local/share/perl/5.18.2/MooseX/Storage/Engine.pm line 249
MooseX::Storage::Engine::__ANON__(ARRAY(0x660f9a0), HASH(0x4d047e8)) called
at /usr/local/share/perl/5.18.2/MooseX/Storage/Engine.pm line 91
MooseX::Storage::Engine::collapse_attribute_value(MooseX::Storage::Engine=HASH(0x685fca0),
Moose::Meta::Class::__ANON__::SERIAL::5=HASH(0x6772df8), HASH(0x4d047e8))
called at /usr/local/share/perl/5.18.2/MooseX/Storage/Engine.pm line 61
MooseX::Storage::Engine::collapse_attribute(MooseX::Storage::Engine=HASH(0x685fca0),
Moose::Meta::Class::__ANON__::SERIAL::5=HASH(0x6772df8), HASH(0x4d047e8))
called at /usr/local/share/perl/5.18.2/MooseX/Storage/Engine.pm line 144
MooseX::Storage::Engine::map_attributes(MooseX::Storage::Engine=HASH(0x685fca0),
"collapse_attribute", HASH(0x4d047e8)) called at
/usr/local/share/perl/5.18.2/MooseX/Storage/Engine.pm line 38
MooseX::Storage::Engine::collapse_object(MooseX::Storage::Engine=HASH(0x685fca0))
called at /usr/local/share/perl/5.18.2/MooseX/Storage/Basic.pm line 12
MooseX::Storage::Basic::pack(MyApp::Model::System=HASH(0x685fda8)) called
at /usr/local/share/perl/5.18.2/Meerkat/Collection.pm line 327
Meerkat::Collection::_save(MyApp::Collection::System=HASH(0x666e898),
MyApp::Model::System=HASH(0x685fda8)) called at
../lib/MyApp/Collection/System.pm line 18
MyApp::Collection::System::__ANON__(MyApp::Collection::System=HASH(0x666e898),
HASH(0x63b1be8)) called at
/usr/local/lib/perl/5.18.2/Moose/Meta/Method/Overridden.pm line 38
MyApp::Collection::System::create(MyApp::Collection::System=HASH(0x666e898),
HASH(0x63b1be8)) called at ../lib/MyApp/Collection/System.pm line 58
MyApp::Collection::System::create_from_hopper(MyApp::Collection::System=HASH(0x666e898),
HASH(0x6669078)) called at ../lib/MyApp/Controller/Hopper.pm line 195
MyApp::Controller::Hopper::update_system(MyApp::Controller::Hopper=HASH(0x1683158),
231058, HASH(0x6669078)) called at ../lib/MyApp/Controller/Hopper.pm line
145
MyApp::Controller::Hopper::run(MyApp::Controller::Hopper=HASH(0x1683158),
HASH(0x1683278)) called at ./get_foo_updates.pl line 10
------------------------------
todd.bruner@gmail.com
On Wed, Apr 29, 2015 at 6:00 PM, Karen Etheridge via RT <
bug-MooseX-Storage@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=104106 >
>
> On 2015-04-29 14:32:49, toddbruner wrote:
> > I'm using David Golden's Meerkat to create objects and store them in a
> > MongoDB.
> > My code works without complaint on my development system. The
> > MooseX::Storage version is 0.48 and Meerkat is 0.10 on my dev box.
> > On my production box, (MooseX::Storage 0.49 and Meerkat 0.10) I get the
> > following message when I execute this code:
>
> > Object (1) does not have a &pack method, cannot collapse at
> > /usr/local/share/perl/5.18.2/MooseX/Storage/Engine.pm line 207.
> > ...stack trace omitted...
> >
> > The object is created, so this isn't critical, but the confess stack
> trace
> > is annoying. What do I need to do differently in 0.49 to quiet this
> > confess?
>
> I'm not sure what Meerkat is doing with its serializers, but the bit of
> code that you're hitting (the collapse handler at line 207) should only be
> getting called for blessed objects. However, the $obj being printed in the
> error message doesn't look like it's blessed.
>
> Can you try editing MooseX::Storage::Engine to include a Data::Dumper of
> the $obj in the confess message?
> And being able to see the full stack trace (that you omitted above) would
> be quite helpful here too.
>
>