view release on metacpan or search on metacpan
script/cloudconvert view on Meta::CPAN
## check usage
pod2usage("missing apikey") unless $opt{apikey};
pod2usage("missing input file") unless @ARGV;
## guess missing options
my ($input, $output) = @ARGV;
if ($input =~ /(.+)\.([a-z0-9]+)$/) {
$opt{from} ||= $2;
if (!defined $output and $opt{to}) {
$output = "$1.".$opt{to};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
#pod =method load_string
#pod
#pod my $meta = CPAN::Meta->load_string($string, \%options);
#pod
#pod If you don't know if a string contains YAML or JSON, this method will use
#pod L<Parse::CPAN::Meta> to guess. In other respects it is identical to
#pod C<load_file()>.
#pod
#pod =cut
sub load_string {
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=head2 load_string
my $meta = CPAN::Meta->load_string($string, \%options);
If you don't know if a string contains YAML or JSON, this method will use
L<Parse::CPAN::Meta> to guess. In other respects it is identical to
C<load_file()>.
=head2 save
$meta->save($distmeta_file, \%options);
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
MAPPING section below to learn about those.
=item * strict checking of JSON correctness
There is no guessing, no generating of illegal JSON texts by default,
and only JSON is accepted as input by default (the latter is a security feature).
But when some options are set, loose chcking features are available.
=back
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=head2 PERL -> JSON
The mapping from Perl to JSON is slightly more difficult, as Perl is a
truly typeless language, so we can only guess which JSON type is meant by
a Perl value.
=over 4
=item hash references
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=head1 OBJECT METHODS
=head2 C<< name() >>
Returns the name of the package represented by this module. If there
is more than one package, it makes a best guess based on the
filename. If it's a script (i.e. not a *.pm) the package name is
'main'.
=head2 C<< version($package) >>
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=head2 load_string
my $metadata_structure = Parse::CPAN::Meta->load_string($some_string);
If you don't know whether a string contains YAML or JSON data, this method
will use some heuristics and guess. If it can't tell, it assumes YAML.
=head2 yaml_backend
my $backend = Parse::CPAN::Meta->yaml_backend;
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
$self->environment_vars_string;
}
sub environment_vars_string {
my ($self, $shelltype) = @_;
$shelltype ||= $self->guess_shelltype;
my $extra = $self->extra;
my @envs = (
PATH => $self->bins,
PERL5LIB => $self->libs,
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
}
mkdir $_ for reverse @dirs;
return;
}
sub guess_shelltype {
my $shellbin
= defined $ENV{SHELL}
? ($ENV{SHELL} =~ /([\w.]+)$/)[-1]
: ( $^O eq 'MSWin32' && exists $ENV{'!EXITCODE'} )
? 'bash'
view all matches for this distribution
view release on metacpan or search on metacpan
}
sub INTERPOLATE_ENV () { 1 }
sub LITERAL_ENV () { 0 }
sub guess_shelltype {
my $shellbin = 'sh';
if(defined $ENV{'SHELL'}) {
my @shell_bin_path_parts = File::Spec->splitpath($ENV{'SHELL'});
$shellbin = $shell_bin_path_parts[-1];
}
# call itself csh unless it really is. also, default to bourne in the
# pathological situation where a user doesn't have $ENV{SHELL} defined.
# note also that shells with funny names, like zoid, are assumed to be
# bourne.
my $shelltype = $class->guess_shelltype;
while (@envs) {
my ($name, $value) = (shift(@envs), shift(@envs));
$value =~ s/(\\")/\\$1/g;
$out .= $class->${\"build_${shelltype}_env_declaration"}($name, $value);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/dategrep/Date.pm view on Meta::CPAN
$to -= $to % 60;
my $from = $to - $minutes * 60;
return ( $from, $to );
}
sub guess_format {
my ( $self, $line ) = @_;
for my $format ( @{ $self->{formats} } ) {
my $date = eval { App::dategrep::Strptime::strptime( $line, $format ) };
warn "$@" if $@;
return $format if $date;
lib/App/dategrep/Date.pm view on Meta::CPAN
}
sub to_epoch {
my ( $self, $line, $format, $defaults ) = @_;
$format ||= $self->guess_format($line);
if ( !$format ) {
return ( undef, "No date found in line $line" );
}
view all matches for this distribution
view release on metacpan or search on metacpan
bin/module-depakable view on Meta::CPAN
So in other words, this routine checks that a module is PP (pure-perl) I<and> all
of its (direct and indirect) dependencies are PP or core.
To check whether a module is PP/XS, C<Module::XSOrPP> is used and this requires
that the module is installed because C<Module::XSOrPP> guesses by analyzing the
module's source code.
To list all direct and indirect dependencies of a module, C<lcpan> is used, so
that application must be installed and run first to download and index a local
CPAN/CPAN-like repository.
view all matches for this distribution
view release on metacpan or search on metacpan
$msg .= "\n" unless $msg =~ /\n$/;
warn "DEBUG: $msg" if $DEBUG;
}
sub _guess_format_from_filename {
my $filename = shift;
# try to detect type from filename
if ($filename =~ /\.(json|js)\z/i) {
return 'json';
last;
} elsif ($filename =~ s/:(json|yaml|perl)\z//) {
$fmt = $1;
last;
} else {
$fmt = _guess_format_from_filename($filename);
last if $fmt;
}
# XXX detect format by reading a few lines from it
last;
} elsif ($filename =~ s/:(json|yaml|perl)\z//) {
$fmt = $1;
last;
} else {
$fmt = _guess_format_from_filename($filename);
last if $fmt;
}
$fmt = $Opts{default_output_format};
}
=item * Convert JSON to YAML
% dt books.json -o books.yaml
Input and output format are guessed from filename extension. Or, you can also
use C<:FORMAT> notation for input, e.g.:
% dt books.dat:json -o books.yml
These formats are currently supported: C<json>, C<yaml>, C<perl>.
Set default output format. Default is C<json>. Can also be C<yaml>, C<perl>,
C<raw>.
=item * --output FILENAME, -o
Add an output. Format will be guessed from .
If not specified, will output all data to STDOUT.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-id view on Meta::CPAN
# my $self = shift;
# $self->{stream} .= join '', @_;
#}
#
## Emit a string value. YAML has many scalar styles. This routine attempts to
## guess the best style for the text.
#sub _emit_str {
# my $self = shift;
# my $type = $_[1] || 0;
#
# # Use heuristics to find the best scalar emission style.
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-ind view on Meta::CPAN
# my $self = shift;
# $self->{stream} .= join '', @_;
#}
#
## Emit a string value. YAML has many scalar styles. This routine attempts to
## guess the best style for the text.
#sub _emit_str {
# my $self = shift;
# my $type = $_[1] || 0;
#
# # Use heuristics to find the best scalar emission style.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FlashVideo/Generic.pm view on Meta::CPAN
$param =~ /([^ ]+@{[EXTENSIONS]})/gi,
$param =~ /SWFObject\(["']([^"']+)/) {
debug "Found $file";
my ($actual_url, $filename, $filename_is_reliable) = guess_file($browser, $file, '', $prefs);
if(!$actual_url && $file =~ /\?(.*)/) {
# Maybe we have query params?
debug "Trying query param on $1";
for my $query_param(split /[;&]/, $1) {
my($query_key, $query_value) = split /=/, $query_param;
debug "Found $query_value from $query_key";
($actual_url, $filename, $filename_is_reliable)
= guess_file($browser, $query_value, '', $prefs);
last if $actual_url;
}
}
lib/FlashVideo/Generic.pm view on Meta::CPAN
}
return;
}
sub guess_file {
my($browser, $file, $once, $prefs) = @_;
# Contains lots of URI encoding, so try escaping..
$file = uri_unescape($file) if scalar(() = $file =~ /%[A-F0-9]{2}/gi) > 3;
lib/FlashVideo/Generic.pm view on Meta::CPAN
# It's a video..
debug "Found a video at $uri";
return $uri;
}
# If this looks like HTML we have no hope of guessing right, so
# give up now.
return if $browser->content =~ /<html[^>]*>/i;
if($browser->content =~ m!($video_re)!) {
# Found a video URL
return $1;
} elsif(!defined $once
&& $browser->content =~ m!(http[-:/a-zA-Z0-9%_.?=&]+)!i) {
# Try once more, one level deeper..
return guess_file($browser, $1, 1, $prefs);
} else {
info "Tried $uri, but no video URL found";
}
} elsif($content_type =~ m!application/! && $uri ne $orig_uri) {
# We were redirected, maybe something in the new URL?
lib/FlashVideo/Generic.pm view on Meta::CPAN
my $swf_uri = URI->new_abs($1, $browser->uri);
if($swf_uri) {
my $new_uri = URI->new_abs($file, $swf_uri);
debug "Found SWF: $swf_uri -> $new_uri";
if($new_uri ne $uri) {
return guess_file($browser, $new_uri, 1, $prefs);
}
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
else {
print
"*** Dependencies will be installed the next time you type '$make'.\n";
}
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
# my $self = shift;
# $self->{stream} .= join '', @_;
#}
#
## Emit a string value. YAML has many scalar styles. This routine attempts to
## guess the best style for the text.
#sub _emit_str {
# my $self = shift;
# my $type = $_[1] || 0;
#
# # Use heuristics to find the best scalar emission style.
view all matches for this distribution
view release on metacpan or search on metacpan
t/encoding-rss.t view on Meta::CPAN
<link>https://alexschroeder.ch/</link>
<pubDate>Mon, 13 Jan 2020 23:16:01 +0100</pubDate>
<item>
<title>Ø§ÙØ³ÙÙØ§Ù
عÙÙÙ</title>
<link>http://hello/wiki?user=Alex&lang=ar</link>
<description><style>some CSS, I guess</style><em>D&D</em> is not bad!<br>You'll like <span class='p-name'>Foo & Bar</span>.</description>
<author><span class='p-author h-card'>Alex Schroeder</span></author>
</item>
</channel>
</rss>
EOT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/lcpan/Cmd/doc.pm view on Meta::CPAN
ORDER BY content.size DESC
LIMIT 1", {}, @bind);
last LOOK if $row;
if ($ext eq 'pod') {
# .pod doesn't always declare package so we also try to guess
# from content path
$name =~ s!::!/!g; $name .= ".pod";
@where = ("content.path LIKE ?");
push @where, ("NOT(file.name LIKE '%-Lumped-%')"); # tmp
@bind = ("%$name");
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
if ( @Missing and not( $CheckOnly or $UnderCPAN ) ) {
require Config;
print
"*** Dependencies will be installed the next time you type '$Config::Config{make}'.\n";
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/loggrep.pm view on Meta::CPAN
return 0 if $start <= $t1;
my $lim = $#$lines;
my ( $s, $e ) = ( [ 0, $t1 ], [ $lim, $t2 ] );
my ( $last, $revcount ) = ( -1, 0 );
{
my $i = _guess( $s, $e, $start );
return $i if $i == $s->[0];
my $rev = $last == $i;
$last = $i;
if ($rev) { # if we find ourselves looping; bail out
$revcount++;
lib/App/loggrep.pm view on Meta::CPAN
redo;
}
}
# estimate the next log line to try
sub _guess {
my ( $s, $e, $start ) = @_;
my $delta = $start - $s->[1];
return $s->[0] unless $delta;
my $diff = $e->[1] - $s->[1];
my $offset = int( ( $e->[0] - $s->[0] ) * $delta / $diff );
view all matches for this distribution
view release on metacpan or search on metacpan
Date : 2019-11-19 21:02:51 +0000
fix default watch directories
Morbo doesn't watch the current directory. It watches the 'lib' and
'templates' directories and the Mojolicious app script. We guess at
the app script if we can, and pick the 'lib' and 'templates'
directories.
Watching the current directory by default also ensures that anything
written to the `MOJO_HOME` will cause a restart. Since it's common
view all matches for this distribution
view release on metacpan or search on metacpan
1.06
- guess MIME type based on file extension (that is, .txt files are no
longer served as text/gemini, you need to use .gmi, or some other
file extension File::MimeInfo doesn't know about)
- new dependency: File::MimeInfo
view all matches for this distribution
view release on metacpan or search on metacpan
script/_metasyn view on Meta::CPAN
# my $self = shift;
# $self->{stream} .= join '', @_;
#}
#
## Emit a string value. YAML has many scalar styles. This routine attempts to
## guess the best style for the text.
#sub _emit_str {
# my $self = shift;
# my $type = $_[1] || 0;
#
# # Use heuristics to find the best scalar emission style.
view all matches for this distribution
view release on metacpan or search on metacpan
mimi.fatpack view on Meta::CPAN
] .join("\n",'',@post_call_frag,'').q[
return (wantarray) ? @ret : $ret[0];
}
];no strict qw(refs);my$code_ref=eval qq{#line 1 "DBI::PurePerl $method"\n$method_code};warn "$@\n$method_code\n" if $@;die "$@\n$method_code\n" if $@;*$method=$code_ref;if (0 && $method =~ /\b(connect|FETCH)\b/){my$l=0;warn "*$method code:\n"....
DBI_PUREPERL
$fatpacked{"DBI/SQL/Nano.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'DBI_SQL_NANO';
package DBI::SQL::Nano;use strict;use warnings;use vars qw($VERSION $versions);use Carp qw(croak);require DBI;BEGIN {$VERSION="0.03";$versions->{nano_version}=$VERSION;if ($ENV{DBI_SQL_NANO}||!eval {require SQL::Statement;$SQL::Statement::VERSION g...
DBI_SQL_NANO
mimi.fatpack view on Meta::CPAN
$fatpacked{"Module/Build.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MODULE_BUILD';
package Module::Build;use if $] >= 5.019,'deprecate';use 5.006;use strict;use warnings;use File::Spec ();use File::Path ();use File::Basename ();use Perl::OSType ();use Module::Build::Base;our@ISA=qw(Module::Build::Base);our$VERSION='0.03';$VERSION...
MODULE_BUILD
$fatpacked{"Module/Build/Base.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MODULE_BUILD_BASE';
package Module::Build::Base;use 5.006;use strict;use warnings;our$VERSION='0.03';$VERSION=eval$VERSION;use Carp;use Cwd ();use File::Copy ();use File::Find ();use File::Path ();use File::Basename ();use File::Spec 0.82 ();use File::Compare ();use M...
ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
of the modules indicated above before proceeding with this installation
EOF
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
else {
print
"*** Dependencies will be installed the next time you type '$make'.\n";
}
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
script/orgsel view on Meta::CPAN
** agus putra
** susan muliawati
** susi
** susi (ron's friend) :vet:
- log ::
+ [2021-04-03] met her again (the 3rd time i guess?) at ron's birthday party.
she's married now.
+ [2019-01-02] entry
Now for some selecting examples on F<addressbook.org>:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/p5stack.pm view on Meta::CPAN
$self->{skip_install} = 1;
$self->{p5stack_root} = catfile($ENV{HOME},'.p5stack');
$self->{perls_root} = catfile($ENV{HOME},'.p5stack','perls');
$self->{perl_version} = '5.20.3';
# guess stuff from context
$self->{deps} = 'cpanfile' if -e 'cpanfile';
# read config from file if available
my $file;
-e 'p5stack.yml' and $file = 'p5stack.yml';
view all matches for this distribution
view release on metacpan or search on metacpan
bin/part.pl view on Meta::CPAN
=over 4
=item B<--out> - set the output template
If the output template is not given it is guessed from
the name of the first input file or set to C<part-%s.txt>.
The C<%s> will be replaced by the column value.
=item B<--column> - set the column to part on
bin/part.pl view on Meta::CPAN
exit 0;
};
pod2usage("$0: No files given.") if ((@ARGV == 0) && (-t STDIN));
if (! defined $tmpl) {
# Let's hope we can guess from the first filename
my $placeholder = '-%s' x @col;
($tmpl = $ARGV[0] || 'part.txt') =~ s/\.(\w+)$/$placeholder.$1/;
};
if (! defined $sep) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/perlfind/Plugin/UseModule.pm view on Meta::CPAN
C<Foo::Bar::some_function> or a module that's not installed but whose
namespace-parent might be installed. For example, if C<Foo::Bar> is installed
but C<Foo::Bar::Baz> isn't, we don't want think that there is a function
C<Baz()> in the package C<Foo::Bar>; rather we want to show the docs for
C<Foo::Bar::Baz>. To distinguish between a function and a module, use a simple
heuristic, which means it's a guess and won't always work: if the final symbol
starts with an uppercase character, we assume it's a package, otherwise we
assume it's a function.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/perlimports/Document.pm view on Meta::CPAN
sub _has_import_switches {
my $self = shift;
my $module_name = shift;
# If switches are being passed to import, we can't guess as what is correct
# here.
#
# Getopt::Long uses a leading colon rather than a dash. This overrides
# Exporter's defaults. You would normally assume that :config is an export
# tag, but instead it's something entirely different.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/perlmv/scriptlet/according_to_containing_dir.pm view on Meta::CPAN
summary => q[Rename file according to its containing directory's name, e.g. foo/1.txt to foo/foo.txt, or foo/somejpeg to foo/foo.jpg],
description => <<'MARKDOWN',
In addition to renaming the file according to the name of its container
directory, if the file does not have an extension yet, an extension will be
given by guessing according to its MIME type using <pm:File::MimeInfo::Magic>,
similar to what the `add_extension_according_to_mime_type` scriptlet does.
MARKDOWN
code => sub {
package
lib/App/perlmv/scriptlet/according_to_containing_dir.pm view on Meta::CPAN
if (-d $_) {
warn "Directory '$_' skipped\n";
return;
}
# guess file extension
my ($ext) = /\.(\w+)\z/;
GUESS_EXT: {
if (defined $ext) {
warn "DEBUG: File '$_' already has extension '$ext', skipped guessing extension\n" if $ENV{DEBUG};
last;
}
require File::MimeInfo::Magic;
my $arg;
if (-l $_) { open my $fh, "<", $_ or do { warn "Can't open symlink $_: $!, skipped\n"; return }; $arg = $fh } else { $arg = $_ }
my $type = File::MimeInfo::Magic::mimetype($arg);
unless ($type) {
warn "Can't get MIME type from file '$_', skipped guessing extension\n";
last;
}
my @exts = File::MimeInfo::Magic::extensions($type) or die "Bug! extensions() does not return extensions for type '$type'";
warn "DEBUG: extensions from extensions($type) for file '$_': ".join(", ", @exts)."\n" if $ENV{DEBUG};
lib/App/perlmv/scriptlet/according_to_containing_dir.pm view on Meta::CPAN
=head1 DESCRIPTION
In addition to renaming the file according to the name of its container
directory, if the file does not have an extension yet, an extension will be
given by guessing according to its MIME type using L<File::MimeInfo::Magic>,
similar to what the C<add_extension_according_to_mime_type> scriptlet does.
=head1 ENVIRONMENT
=head2 DEBUG
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/perlmv/scriptlet/add_extension_according_to_mime_type.pm view on Meta::CPAN
our $DATE = '2023-06-30'; # DATE
our $DIST = 'App-perlmv-scriptlet-add_extension_according_to_mime_type'; # DIST
our $VERSION = '0.607'; # VERSION
our $SCRIPTLET = {
summary => q[Guess the file content's MIME type using File::MimeInfo::Magic then if type can be guessed and file doesn't yet have extension or has unmatching extension then add an extension],
code => sub {
package
App::perlmv::code;
require File::MimeInfo::Magic;
lib/App/perlmv/scriptlet/add_extension_according_to_mime_type.pm view on Meta::CPAN
},
};
1;
# ABSTRACT: Guess the file content's MIME type using File::MimeInfo::Magic then if type can be guessed and file doesn't yet have extension or has unmatching extension then add an extension
__END__
=pod
=encoding UTF-8
=head1 NAME
App::perlmv::scriptlet::add_extension_according_to_mime_type - Guess the file content's MIME type using File::MimeInfo::Magic then if type can be guessed and file doesn't yet have extension or has unmatching extension then add an extension
=head1 VERSION
This document describes version 0.607 of App::perlmv::scriptlet::add_extension_according_to_mime_type (from Perl distribution App-perlmv-scriptlet-add_extension_according_to_mime_type), released on 2023-06-30.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/perlrdf/FileSpec/InputRDF.pm view on Meta::CPAN
{
return 'RDF::TrineX::Parser::Pretdsl'
if $self->uri->file =~ /\.(pret|pretdsl)/i;
return RDF::Trine::Parser
-> guess_parser_by_filename($self->uri->file);
}
if ($self->can('response'))
{
return $self->response->content_type
if $self->response->content_type;
return 'RDF::TrineX::Parser::Pretdsl'
if (($self->response->base // $self->uri) =~ /\.(pret|pretdsl)/i);
return RDF::Trine::Parser->guess_parser_by_filename(
$self->response->base // $self->uri,
);
}
return 'RDF::TrineX::Parser::Pretdsl'
if $self->uri =~ /\.(pret|pretdsl)/i;
return RDF::Trine::Parser->guess_parser_by_filename($self->uri);
}
sub _build_parser
{
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Phoebe/StaticFiles.pm view on Meta::CPAN
return 1;
}
return;
}
# cheap MIME type guessing; alternatively, use File::MimeInfo
sub mime_type {
$_ = shift;
return 'text/gemini' if /\.gmi$/i;
return 'text/plain' if /\.te?xt$/i;
return 'text/markdown' if /\.md$/i;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/plx.pm view on Meta::CPAN
my ($oval, $eval) = ($orig_env{$key}, $ENV{$key});
if (!defined($eval) or ($oval//'') ne $eval) {
push @env_change, [ $key, $eval ];
}
}
my $shelltype = local::lib->guess_shelltype;
my $shellbuild = "build_${shelltype}_env_declaration";
foreach my $change (@env_change) {
print +local::lib->$shellbuild(@$change);
}
}
view all matches for this distribution