CPANPLUS
view release on metacpan or search on metacpan
bundled/Build.pm view on Meta::CPAN
$build->install; # runs build install
=head1 DESCRIPTION
C<CPANPLUS::Dist::Build> is a distribution class for C<Module::Build>
related modules.
Using this package, you can create, install and uninstall perl
modules. It inherits from C<CPANPLUS::Dist>.
Normal users won't have to worry about the interface to this module,
as it functions transparently as a plug-in to C<CPANPLUS> and will
just C<Do The Right Thing> when it's loaded.
=head1 ACCESSORS
=over 4
=item C<parent()>
Returns the C<CPANPLUS::Module> object that parented this object.
inc/bundle/Archive/Tar.pm view on Meta::CPAN
Read the given tar file into memory.
The first argument can either be the name of a file or a reference to
an already open filehandle (or an IO::Zlib object if it's compressed)
The C<read> will I<replace> any previous content in C<$tar>!
The second argument may be considered optional, but remains for
backwards compatibility. Archive::Tar now looks at the file
magic to determine what class should be used to open the file
and will transparently Do The Right Thing.
Archive::Tar will warn if you try to pass a bzip2 / xz compressed file and the
IO::Uncompress::Bunzip2 / IO::Uncompress::UnXz are not available and simply return.
Note that you can currently B<not> pass a C<gzip> compressed
filehandle, which is not opened with C<IO::Zlib>, a C<bzip2> compressed
filehandle, which is not opened with C<IO::Uncompress::Bunzip2>, a C<xz> compressed
filehandle, which is not opened with C<IO::Uncompress::UnXz>, nor a string
containing the full archive information (either compressed or
uncompressed). These are worth while features, but not currently
inc/bundle/Archive/Tar.pm view on Meta::CPAN
my $compress = shift || 0;
my $mode = shift || READ_ONLY->( ZLIB ); # default to read only
### Check if file is a file handle or IO glob
if ( ref $file ) {
return $file if eval{ *$file{IO} };
return $file if eval{ $file->isa(q{IO::Handle}) };
$file = q{}.$file;
}
### get a FH opened to the right class, so we can use it transparently
### throughout the program
my $fh;
{ ### reading magic only makes sense if we're opening a file for
### reading. otherwise, just use what the user requested.
my $magic = '';
if( MODE_READ->($mode) ) {
open my $tmp, $file or do {
$self->_error( qq[Could not open '$file' for reading: $!] );
return;
};
inc/bundle/File/Fetch.pm view on Meta::CPAN
of a file:// is considered to the be volume specification for the file.
Thus on Win32 this routine returns the volume, on other operating
systems this returns nothing.
On Windows this value may be empty if the uri is to a network share, in
which case the 'share' property will be defined. Additionally, volume
specifications that use '|' as ':' will be converted on read to use ':'.
On VMS, which has a volume concept, this field will be empty because VMS
file specifications are converted to absolute UNIX format and the volume
information is transparently included.
=item $ff->share
On systems with the concept of a network share (currently only Windows) returns
the sharename from a file://// url. On other operating systems returns empty.
=item $ff->path
The path from the uri, will be at least a single '/'.
inc/bundle/HTTP/Tiny.pm view on Meta::CPAN
=head1 DESCRIPTION
This is a very simple HTTP/1.1 client, designed for doing simple
requests without the overhead of a large framework like L<LWP::UserAgent>.
It is more correct and more complete than L<HTTP::Lite>. It supports
proxies and redirection. It also correctly resumes after EINTR.
If L<IO::Socket::IP> 0.25 or later is installed, HTTP::Tiny will use it instead
of L<IO::Socket::INET> for transparent support for both IPv4 and IPv6.
Cookie support requires L<HTTP::CookieJar> or an equivalent class.
=head1 METHODS
=head2 new
$http = HTTP::Tiny->new( %attributes );
This constructor returns a new HTTP::Tiny object. Valid attributes include:
inc/bundle/JSON/PP.pm view on Meta::CPAN
and expect Unicode strings, that is, characters with high ordinal Unicode
values (> 255) will be encoded as such characters, and likewise such
characters are decoded as-is, no changes to them will be done, except
"(re-)interpreting" them as Unicode codepoints or Unicode characters,
respectively (to Perl, these are the same thing in strings unless you do
funny/weird/dumb stuff).
This is useful when you want to do the encoding yourself (e.g. when you
want to have UTF-16 encoded JSON texts) or when some other layer does
the encoding for you (for example, when printing to a terminal using a
filehandle that transparently encodes to UTF-8 you certainly do NOT want
to UTF-8 encode your data first and have Perl encode it another time).
=item C<utf8> flag enabled
If the C<utf8>-flag is enabled, C<encode>/C<decode> will encode all
characters using the corresponding UTF-8 multi-byte sequence, and will
expect your input strings to be encoded as UTF-8, that is, no "character"
of the input string must have any value > 255, as UTF-8 does not allow
that.
inc/bundle/Log/Message.pm view on Meta::CPAN
As a configuration file when you create a new L<Log::Message> object.
(The config will then only apply to that object if you marked it as
private)
=item *
As arguments when you create a new Log::Message object.
You should never need to use the L<Log::Message::Config> module yourself,
as this is transparently done by L<Log::Message>, but its manpage does
provide an explanation of how you can create a config file.
=back
=back
=head1 Options
When using Log::Message, or creating a new Log::Message object, you can
supply various options to alter its behaviour.
inc/bundle/Term/UI.pm view on Meta::CPAN
### always pick the default (good for non-interactive terms)
### -- default is '0'
$Term::UI::AUTOREPLY = 1;
### Retrieve the entire session as a printable string:
$hist = Term::UI::History->history_as_string;
$hist = $term->history_as_string;
=head1 DESCRIPTION
C<Term::UI> is a transparent way of eliminating the overhead of having
to format a question and then validate the reply, informing the user
if the answer was not proper and re-issuing the question.
Simply give it the question you want to ask, optionally with choices
the user can pick from and a default and C<Term::UI> will DWYM.
For asking a yes or no question, there's even a shortcut.
=head1 HOW IT WORKS
lib/CPANPLUS/Dist.pm view on Meta::CPAN
### when installing Bundle::CPANPLUS::Dependencies, we want to
### install all packages matching 'cpanplus' to be installed last,
### as all CPANPLUS' prereqs are being installed as well, but are
### being loaded for bootstrapping purposes. This means CPANPLUS
### can find them, but for example cpanplus::dist::build won't,
### which gets messy FAST. So, here we sort our prereqs only IF
### the parent module is Bundle::CPANPLUS::Dependencies.
### Really, we would want some sort of sorted prereq mechanism,
### but Bundle:: doesn't support it, and we flatten everything
### to a hash internally. A sorted hash *might* do the trick if
### we got a transparent implementation.. that would mean we would
### just have to remove the 'sort' here, and all will be well
my @sorted_prereqs;
### use regex, could either be a module name, or a package name
if( $self->module =~ /^Bundle(::|-)CPANPLUS(::|-)Dependencies/ ) {
my (@first, @last);
for my $mod ( sort keys %$prereqs ) {
$mod =~ /CPANPLUS/
? push @last, $mod
: push @first, $mod;
( run in 0.574 second using v1.01-cache-2.11-cpan-a1d94b6210f )