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 ;
The new method creates an object of the class $package.
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 ;
Uri Guttman, <uri\@stemsystems.com>
3 POD Errors
The following errors were encountered while parsing the POD:
You can't have =items (as at line 162) unless the first thing after the =over is an =item
You can't have =items (as at line 183) unless the first thing after the =over is an =item
=cut found outside a pod block. Skipping to next block.
To install Stem, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Stem
CPAN shell
perl -MCPAN -e shell install Stem
For more information on module installation, please visit the detailed CPAN module installation guide.