Class Attributes for $package

    POD

    #print "POD [$pod]\n" ;

    foreach my $attr_ref ( @{$attr_list} ) {
    
    	my $name = $attr_ref->{name} ;
    
    	if ( $name ) {
    
    		$pod .= <<POD ;

    * Attribute - $name

      POD } else {

      	warn <<WARN ;
      Missing attribute name in Class $package in file $file_name
      WARN
      
      	next ;
      }
      
      my $help = $attr_ref->{help} ;
      
      if ( defined( $help ) ) {
      
      	$pod .= <<POD ;

      Description:

      $help POD } else {

      	warn <<WARN ;
      Missing help in attribute $name in Class $package in file $file_name
      WARN
      }
      
      if ( my $attr_class = $attr_ref->{class} ) {
      
      	my $class_args = '<' .
      		join( ', ', @{$attr_ref->{class_args} || []} )
      		 . '>' ;
      
      	$pod .= <<POD ;

      Class Attribute:

      '$name' is an object of class $attr_class and constructed with: $class_args POD }

      exists( $attr_ref->{type} ) and $pod .= <<POD ;

      The type of '$name' is:

      $attr_ref->{type} POD

      if ( exists( $attr_ref->{default} ) ) {
      
      	my $default = $attr_ref->{default} ;
      
      	if( ref($default) eq "ARRAY" ) {
      
      		$default =
      			'(' . join( ', ', @{$default} ) . ')' ;
      	}
      
      	$pod .= <<POD

      Default value:

      $default POD }

      exists( $attr_ref->{required} ) and $pod .= <<POD ;

      It is required. POD

      foreach my $attr ( sort keys %{ $attr_ref } ) {
      	next if $is_attr_part{ $attr } ;
      	$pod .= "Unknown attribute $attr\n" ;
      }
      
      $pod .= <<POD ;

    POD }

    $pod .= <<POD ;

Constructor - new

The new method creates an object of the class $package.

POD

return <<POD if $name eq 'msg_in' ;
=head3 Message Handler - B<msg_in>

The msg_in method is effectively a default method for message delivery. If any message to this cell can't be delivered to another method, then it will be delivered to the msg_in method. If a command message is delivered and a value is returned by msg_in, a response message is sent back to the originating cell with that value. POD

return <<POD if $name =~ /(\w+)_in$/ ;
=head3 Message Handler - $name

$1 type messages are delivered to this method. Its return value is ignored by the message delivery system. POD

return <<POD if $name =~ /(\w+)_cmd$/ ;
=head3 Command Message Handler - $name

$1 command messages are delivered to this method. If any value is returned, the message delivery system will create a response type message and dispatch it back to the sending cell. POD

return <<POD ;
=head3 Method - $name
POD

}

sub update_trailing_pod {

my( $tail_text ) = @_ ;

# return $tail_text if $tail_text =~ /=cut/ ;

#print "1 [$tail_text]\n" ;

return <<POD ;

Bugs

Todo

See Also

Author

Uri Guttman, <uri\@stemsystems.com>

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 147:

You can't have =items (as at line 162) unless the first thing after the =over is an =item

Around line 164:

You can't have =items (as at line 183) unless the first thing after the =over is an =item

Around line 294:

=cut found outside a pod block. Skipping to next block.