package Mine::Openview::opcmsg; use strict; use warnings; sub new { my $class = shift; my %params = @_; my $self = \%params; return bless $self, $class; } sub send { my $self = shift; # Setup arguments for opcmsg command. If the syntax # changes this is were you'll apply the changes. my $cmd = "opcmsg". " msg_text=".$self->{cmd}. " application=".$self{app}. " object=".$self->{obj}. " severity=".$self->{sev}. " msg_grp=".$self->{msgg}. " service_id=".$self->{ser}; return $cmd; } 1; #### ..in module.. sub somefunction { my $self = shift; my $msg = $self->{msg}; }