NAME
OpenERP::OOM::DynamicUtils
VERSION
version 0.43
SYNOPSIS
with 'OpenERP::OOM::DynamicUtils';
...
$self->ensure_class_loaded($class);
...
$object_data->{$attribute->name} = $self->prepare_attribute_for_send($attribute->type_constraint, $object_data->{$attribute->name});
DESCRIPTION
This role provides a couple of common methods for our OpenERP base classes. It's name is a bit of a misnomer because it just contains a couple of useful functions, rather than a clear separation of concerns.
NAME
OpenERP::OOM::DynamicUtils
METHODS
ensure_class_loaded
This method is designed to ensure we have effectively 'use'd the class while ensuring we don't keep reloading it. It is effectively based on code seen in DBIx::Class and various other projects.
prepare_attribute_for_send
This converts dates to strings for sending and wraps up strings in RPC::XML::string objects to prevent numbers from being transmitted as the wrong type.
COPYRIGHT & LICENSE
Copyright (C) 2011 OpusVL
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Jon Allen (JJ), <jj@opusvl.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011-2016 by OpusVL.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.