App-SD
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
# It's in core of perl >= 5.9.3, and should be installed
# as one of the Pod::Simple's prereqs, which is a prereq
# of Pod::Text 3.x (see also below).
$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
{
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
# Pod::Text < 3.0 has yet another mapping table,
# though the table name of 2.x and 1.x are different.
# (1.x is in core of Perl < 5.6, 2.x is in core of
# Perl < 5.9.3)
my $mapping = ($Pod::Text::VERSION < 2)
? \%Pod::Text::HTML_Escapes
: \%Pod::Text::ESCAPES;
$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
{
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
$author =~ s{E<lt>}{<}g;
$author =~ s{E<gt>}{>}g;
}
$self->author($author);
} else {
lib/App/SD/Server/Dispatcher.pm view on Meta::CPAN
$self->server->_send_redirect( to => '/ticket/' . $result->record_uuid );
} else {
next_rule;
}
};
on qr'.' => sub {
my $self = shift;
$self->server->page_nav->child( history => label => 'History', url => '/history');
my $tickets = $self->server->page_nav->child( tickets => label => 'Tickets', url => '/');
$tickets->child( go => label => '<form method="GET" action="/ticket/"><a href="#">Show ticket # <input type=text name=id size=3></a></form>', escape_label => 0) unless($self->server->static);
my $milestones = $tickets->child( milestones => label => 'Milestones', url => '/milestones');
my $items = $self->server->app_handle->setting( label => 'milestones' )->get();
foreach my $item (@$items) {
my $m = $milestones->child( $item => label => $item, url => '/milestone/'.$item);
#$m->child('all' => label => 'All', url => '/milestone/'.$item.'/all');
#$m->child('mine' => label => 'Mine', url => '/milestone/'.$item.'/mine');
#$m->child('closed' => label => 'Closed', url => '/milestone/'.$item.'/closed');
}
tools/dump_sd_help.pl view on Meta::CPAN
open my $cmd, "sd help $_ |";
my $text = slurp($cmd);
# now we can do the real processing
print process_help($text);
}
sub process_help {
my ( $text ) = shift;
# escape markdown metacharacters
$text =~ s/_/\\_/g;
# linkify http links, adapted from MRE 74
$text =~ s{
\b
# Capture the URL to $1
(
# hostname
http:// (?!example) [-a-z0-9]+(\.[-a-z0-9]+)*\.(com|org|us) \b
(
( run in 0.336 second using v1.01-cache-2.11-cpan-c21f80fb71c )