Pod-Confluence
view release on metacpan or search on metacpan
lib/Pod/Confluence.pm view on Meta::CPAN
sub end_item_text {
my ( $self, $attribute_hash ) = @_;
$self->_print('</strong>');
$self->end_Para();
}
sub end_L {
my ( $self, $attribute_hash ) = @_;
if ( $self->{link_type} eq 'pod' ) {
$self->{in_cdata} = 0;
$self->_print( ']]></ac:plain-text-link-body>' . '</ac:link>' );
}
elsif ( $self->{link_type} eq 'url' ) {
$self->_print('</a>');
}
delete( $self->{link_type} );
}
sub end_over_text {
my ( $self, $attribute_hash ) = @_;
lib/Pod/Confluence.pm view on Meta::CPAN
pop( @{ $self->{element_stack} } );
}
sub end_S {
my ( $self, $attribute_hash ) = @_;
$self->{in_non_breaking} = 0;
}
sub end_Verbatim {
my ( $self, $attribute_hash ) = @_;
$self->{in_cdata} = 0;
$self->_print( $self->_confluence_macro_end( has_text => 1 ) );
pop( @{ $self->{element_stack} } );
}
sub _handle_element_end {
$logger->tracef( '_handle_element_end(%s,%s)', $_[1], $_[2] );
Pod::Simple::Methody::_handle_element_end(@_);
}
sub _handle_element_start {
$logger->tracef( '_handle_element_start(%s,%s)', $_[1], $_[2] );
Pod::Simple::Methody::_handle_element_start(@_);
}
sub handle_text {
my ( $self, $text ) = @_;
$text = encode_entities($text) unless ( $self->{in_cdata} );
$text =~ s/[ \t]/ /g if ( $self->{in_non_breaking} );
$logger->tracef( 'handle_text(%s)', $text );
$self->_print($text);
}
sub _init {
my ( $self, %options ) = @_;
$self->{space_key} = $options{space_key};
lib/Pod/Confluence.pm view on Meta::CPAN
$self->_print(
( $attribute_hash->{section}
? "<ac:link ac:anchor='$attribute_hash->{section}'>"
: '<ac:link>'
)
. ( $to ? "<ri:page ri:content-title='$to' ri:space-key='$self->{space_key}'/>"
: ''
)
. '<ac:plain-text-link-body><![CDATA['
);
$self->{in_cdata} = 1;
}
else {
my $url = $to ? "https://metacpan.org/pod/$to" : '';
my $section = $attribute_hash->{section};
if ($section) {
$section =~ s/[^a-zA-Z0-9]+/-/g;
$section =~ s/-$//g;
$url .= "#$section";
}
$self->{link_type} = 'url';
lib/Pod/Confluence.pm view on Meta::CPAN
sub start_Verbatim {
my ( $self, $attribute_hash ) = @_;
$self->_print(
$self->_confluence_macro_start(
'code',
has_text => 1,
parameters => { language => 'perl' }
)
);
$self->{in_cdata} = 1;
}
1;
__END__
=pod
=head1 NAME
( run in 0.324 second using v1.01-cache-2.11-cpan-454fe037f31 )