package LATMOS::Accounts::Bases::OCHelper::Nethost; # $Id: OCHelper.pm 2932 2010-08-10 17:19:21Z nanardon $ use strict; use warnings; use base qw(LATMOS::Accounts::Bases::OCHelper); =head1 NAME LATMOS::Accounts::Bases::OCHelper - Object creation helper =head1 DESCRIPTION This module is designed to be subclassed. =head1 FUNCTIONS =cut # just return status, $info is reference sub _step { my ($self, $info) = @_; if ($info->{step} == 0) { $info->{name}{ask} = 1; @{$info->{ask}} = qw( description ip ipFrom macaddr owner user unexported ); $info->{step} = 1; return 'NEEDINFO'; } elsif ($info->{step} == 1) { if ($self->base->create_c_object($self->otype, $info->{name}{content}, %{$info->{contents} || {}}, )) { return 'CREATED'; } else { return 'ERROR'; } } else { return undef; } } 1; __END__ =head1 SEE ALSO L, L =head1 AUTHOR Olivier Thauvin, Eolivier.thauvin@latmos.ipsl.frE =head1 COPYRIGHT AND LICENSE Copyright (C) 2012 CNRS SA/CETP/LATMOS This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available. =cut