App-cpanminus
view release on metacpan or search on metacpan
$fatpacked{"String/ShellQuote.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'STRING_SHELLQUOTE';
package String::ShellQuote;use strict;use vars qw($VERSION @ISA @EXPORT);require Exporter;$VERSION='1.04';@ISA=qw(Exporter);@EXPORT=qw(shell_quote shell_quote_best_effort shell_comment_quote);sub croak {require Carp;goto&Carp::croak}sub _shell_quot...
STRING_SHELLQUOTE
$fatpacked{"lib/core/only.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'LIB_CORE_ONLY';
package lib::core::only;use strict;use warnings FATAL=>'all';use Config;sub import {@INC=@Config{qw(privlibexp archlibexp)};return}1;
LIB_CORE_ONLY
$fatpacked{"local/lib.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'LOCAL_LIB';
package local::lib;use 5.006;use strict;use warnings;use Config;our$VERSION='2.000015';$VERSION=eval$VERSION;BEGIN {*_WIN32=($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'symbian')? sub(){1}: sub(){0};*_USE_FSPEC=($^O eq 'MacOS' || $^O eq 'VMS' |...
WHOA THERE! It looks like you've got some fancy dashes in your commandline!
These are *not* the traditional -- dashes that software recognizes. You
probably got these by copy-pasting from the perldoc for this module as
rendered by a UTF8-capable formatter. This most typically happens on an OS X
terminal, but can happen elsewhere too. Please try again after replacing the
dashes with normal minus signs.
DEATH
FATAL: The local::lib --self-contained flag has never worked reliably and the
original author, Mark Stosberg, was unable or unwilling to maintain it. As
such, this flag has been removed from the local::lib codebase in order to
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
};
croak($@) if $@;
return $self;
}
#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 {
my ($class, $string, $options) = @_;
$options->{lazy_validation} = 1 unless exists $options->{lazy_validation};
my $self;
eval {
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
my $meta = CPAN::Meta->load_json_string($json, \%options);
This method returns a new CPAN::Meta object using the structure represented by
the given JSON string. In other respects it is identical to C<load_file()>.
=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);
Serializes the object as JSON and writes it to the given file. The only valid
option is C<version>, which defaults to '2'. On Perl 5.8.1 or later, the file
is saved with UTF-8 encoding.
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
When you serialise a perl data structure using only data types supported
by JSON and Perl, the deserialised data structure is identical on the Perl
level. (e.g. the string "2.0" doesn't suddenly become "2" just because
it looks like a number). There I<are> minor exceptions to this, read the
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
=head1 FUNCTIONAL INTERFACE
Some documents are copied and modified from L<JSON::XS/FUNCTIONAL INTERFACE>.
=head2 encode_json
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
A JSON null atom becomes C<undef> in Perl.
C<JSON::PP::null> returns C<unddef>.
=back
=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
Perl hash references become JSON objects. As there is no inherent ordering
in hash keys (or JSON objects), they will usually be encoded in a
pseudo-random order that can change between runs of the same program but
stays generally the same within a single run of a program. C<JSON>
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=head2 C<< log_info (internal) >>
Used internally to perform logging; imported from Log::Contextual if
Log::Contextual has already been loaded, otherwise simply calls warn.
=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) >>
Returns the version as defined by the $VERSION variable for the
package as returned by the C<name> method if no arguments are
given. If given the name of a package it will attempt to return the
version of that package if it is specified in the file.
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
This method deserializes the given string of JSON and the result.
If the source was UTF-8 encoded, the string must be decoded before calling
C<load_json_string>.
=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;
Returns the module name of the YAML serializer. See L</ENVIRONMENT>
for details.
=head2 json_backend
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
print $_[0]->environment_vars_string_for(@_[1..$#_]);
}
sub environment_vars_string_for {
my $self = $_[0]->new->activate($_[1]);
$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,
PERL_LOCAL_LIB_ROOT => $self->roots,
map { $_ => $extra->{$_} } sort keys %$extra,
);
$self->_build_env_string($shelltype, \@envs);
}
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
require File::Basename;
my @dirs;
while(!-d $path) {
push @dirs, $path;
$path = File::Basename::dirname($path);
}
mkdir $_ for reverse @dirs;
return;
}
sub guess_shelltype {
my $shellbin
= defined $ENV{SHELL}
? ($ENV{SHELL} =~ /([\w.]+)$/)[-1]
: ( $^O eq 'MSWin32' && exists $ENV{'!EXITCODE'} )
? 'bash'
: ( $^O eq 'MSWin32' && $ENV{PROMPT} && $ENV{COMSPEC} )
? ($ENV{COMSPEC} =~ /([\w.]+)$/)[-1]
: ( $^O eq 'MSWin32' && !$ENV{PROMPT} )
? 'powershell.exe'
: 'sh';
( run in 2.540 seconds using v1.01-cache-2.11-cpan-702932259ff )