OpusVL / OpenERP-OOM

OpenERP Object to Object Mapper (Perl)
0 stars 1 forks source link

Attribute name 'openerp_connect' doesn't reflect what it represents at call time #3

Open Nick-OpusVL opened 5 years ago

Nick-OpusVL commented 5 years ago

https://github.com/OpusVL/OpenERP-OOM/blob/master/lib/OpenERP/OOM/Schema.pm

Should be openerp_connection_params or similar.

MooseX::Aliases would help us give it a new name with an alias to the old one, hopefully without breaking any existing code/configs.

Then $self->openerp_connect calls elsewhere in the OOM code can be replaced with ones that actually look like they're doing an attribute lookup rather than attempting to connect to an OpenERP.

This misunderstanding sent me on a wild goose chase.

Nick-OpusVL commented 5 years ago

A nice to have would be to show a deprecation warning if the original name is used in initialisation, set or looked up. MooseX::Deprecated might be able to help us with this.