[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



What I'm trying to do is add a hash entry to an array of hashes that are
in this class.  I can not seem to figure out how to get the count.  Can
someone point out what I'm doing wrong?
 

sub new {
  my $class =shift;

  my ($alarm_id,
      $raised,
      $trigger,
      $ensname,
      $locid,
      $locname,
      $notgroup
  ) = @_;

  my $data = {
      'alarm.alarm_id'        => $alarm_id,
      'alarm.raised'          => $raised,
      'alarm.trigger_match'   => $trigger,
      'ens.name'              => $ensname,
      'location.location_id'  => $locid,
      'location.name'         => $locname,
      'notification_group.notification_group_id' => $notgroup,

      #
      # A notification group can have (n) number
      # of escalation groups.  I will store them here
      # as an array of hashes
      #
      'esclationgroups'       => []
  };
  bless($data, $class);
  return $data;
}

sub add_escalation_group {
  my $self = shift;
  my $esc = \$self->{'escalationgroups'};
  my @g = @{$esc};
  my($id, $timeout) = @_;

  #
  # I need to determine the number of objects
  # in the array so I can append to it.
  #



}



</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="01195" href="msg01195.html">[ale] perl question</a></strong>
<ul><li><em>From:</em> ivey at gweezlebur.com (michael d. ivey)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg01192.html">[ale] Spam Blocking Alternatives</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg01194.html">[ale] Accessing Motorola cellphone thru USB?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg01191.html">[ale] U.S. Senate talks about Internet taxes</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg01195.html">[ale] perl question</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#01193"><strong>Date</strong></a></li>
<li><a href="threads.html#01193"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>