mojolicious / mojo-pg

Mojolicious :heart: PostgreSQL
https://metacpan.org/release/Mojo-Pg
Artistic License 2.0
99 stars 46 forks source link

Mojo::Pg::Results error during global destruction #12

Closed nnutter closed 8 years ago

nnutter commented 8 years ago

One of my Mojo::PgX::Cursor tests is consistently producing an error:

Can't call method "FETCH" on an undefined value at .../Mojo/Pg/Results.pm line 13, <DATA> line 2231 during global destruction.

And on occasion another Mojo::PgX::Cursor test does as well.

I'm wondering if Mojo::Pg::Results should get a,

return if defined(${^GLOBAL_PHASE}) && ${^GLOBAL_PHASE} eq 'DESTRUCT';

like Mojo::Pg::Database did in a8dbeab671ec2e4c980637beb3d7627fc74f74f6.

kraih commented 8 years ago

Hard to say without a test case.