App-CPANtoRPM
view release on metacpan or search on metacpan
internal/perl.req view on Meta::CPAN
if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/) ||
( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/) ) {
$tag = $2;
while (<FILE>) {
( $_ =~ /^$tag/) && last;
}
}
# skip q{} quoted sections - just hope we don't have curly brackets
# within the quote, nor an escaped hash mark that isn't a comment
# marker, such as occurs right here. Draw the line somewhere.
if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) {
$tag = $1;
$tag =~ tr/{\(\[\#|\//})]#|\//;
while (<FILE>) {
( $_ =~ m/\}/ ) && last;
}
}
# skip the documentation
lib/App/CPANtoRPM.pm view on Meta::CPAN
#
# Some values may contain email addresses which might be of the form:
# Name <Email>
# and the brackets <> conflict with the SPEC file templated.
#
# The values where this can occur are:
# args : this is already taken care of (< was turned to \<)
# packager : a single value
# author : multiple values
#
# We need to escape the brackets in the unhandled cases.
#
foreach my $val ($package{'packager'},@{ $package{'author'} }) {
$val =~ s/</\\</g;
$val =~ s/>/\\>/g;
}
#
# Start spec file creation...
#
( run in 0.534 second using v1.01-cache-2.11-cpan-c21f80fb71c )