x3x3x3x_5h3ll
— 53cur3 — 5h3ll_1d —
Linux vps-10654784.cedaps.org.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
  INFO SERVER : Apache PHP : 7.4.33
/lib64/perl5/File/
162.240.100.168

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACTN ]
+FILE +DIR
Glob.pm 12.291 KB -rw-r--r-- 2023-10-25 12:41 R E G D
REQUEST EXIT
package File::Glob; use strict; our($VERSION, @ISA, @EXPORT_OK, @EXPORT_FAIL, %EXPORT_TAGS, $DEFAULT_FLAGS); require XSLoader; use feature 'switch'; @ISA = qw(Exporter); # NOTE: The glob() export is only here for compatibility with 5.6.0. # csh_glob() should not be used directly, unless you know what you're doing. %EXPORT_TAGS = ( 'glob' => [ qw( GLOB_ABEND GLOB_ALPHASORT GLOB_ALTDIRFUNC GLOB_BRACE GLOB_CSH GLOB_ERR GLOB_ERROR GLOB_LIMIT GLOB_MARK GLOB_NOCASE GLOB_NOCHECK GLOB_NOMAGIC GLOB_NOSORT GLOB_NOSPACE GLOB_QUOTE GLOB_TILDE bsd_glob glob ) ], ); $EXPORT_TAGS{bsd_glob} = [@{$EXPORT_TAGS{glob}}]; pop @{$EXPORT_TAGS{bsd_glob}}; # no "glob" @EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob'); $VERSION = '1.17'; sub import { require Exporter; local $Exporter::ExportLevel = $Exporter::ExportLevel + 1; Exporter::import(grep { my $passthrough; given ($_) { $DEFAULT_FLAGS &= ~GLOB_NOCASE() when ':case'; $DEFAULT_FLAGS |= GLOB_NOCASE() when ':nocase'; when (':globally') { no warnings 'redefine'; *CORE::GLOBAL::glob = \&File::Glob::csh_glob; } if ($_ eq ':bsd_glob') { no strict; *{caller."::glob"} = \&bsd_glob_override; } $passthrough = 1; } $passthrough; } @_); } XSLoader::load(); $DEFAULT_FLAGS = GLOB_CSH(); if ($^O =~ /^(?:MSWin32|VMS|os2|dos|riscos)$/) { $DEFAULT_FLAGS |= GLOB_NOCASE(); } # File::Glob::glob() is deprecated because its prototype is different from # CORE::glob() (use bsd_glob() instead) sub glob { splice @_, 1; # don't pass PL_glob_index as flags! goto &bsd_glob; } 1; __END__ =head1 NAME File::Glob - Perl extension for BSD glob routine =head1 SYNOPSIS use File::Glob ':bsd_glob'; @list = bsd_glob('*.[ch]'); $homedir = bsd_glob('~gnat', GLOB_TILDE | GLOB_ERR); if (GLOB_ERROR) { # an error occurred reading $homedir } ## override the core glob (CORE::glob() does this automatically ## by default anyway, since v5.6.0) use File::Glob ':globally'; my @sources = <*.{c,h,y}>; ## override the core glob, forcing case sensitivity use File::Glob qw(:globally :case); my @sources = <*.{c,h,y}>; ## override the core glob forcing case insensitivity use File::Glob qw(:globally :nocase); my @sources = <*.{c,h,y}>; ## glob on all files in home directory use File::Glob ':globally'; my @sources = <~gnat/*>; =head1 DESCRIPTION The glob angle-bracket operator C<< <> >> is a pathname generator that implements the rules for file name pattern matching used by Unix-like shells such as the Bourne shell or C shell. File::Glob::bsd_glob() implements the FreeBSD glob(3) routine, which is a superset of the POSIX glob() (described in IEEE Std 1003.2 "POSIX.2"). bsd_glob() takes a mandatory C argument, and an optional C argument, and returns a list of filenames matching the pattern, with interpretation of the pattern modified by the C variable. Since v5.6.0, Perl's CORE::glob() is implemented in terms of bsd_glob(). Note that they don't share the same prototype--CORE::glob() only accepts a single argument. Due to historical reasons, CORE::glob() will also split its argument on whitespace, treating it as multiple patterns, whereas bsd_glob() considers them as one pattern. But see C<:bsd_glob> under L, below. =head2 META CHARACTERS \ Quote the next metacharacter [] Character class {} Multiple pattern * Match any string of characters ? Match any single character ~ User name home directory The metanotation C is a shorthand for C. Left to right order is preserved, with results of matches being sorted separately at a low level to preserve this order. As a special case C<{>, C<}>, and C<{}> are passed undisturbed. =head2 EXPORTS See also the L below, which can be exported individually. =head3 C<:bsd_glob> The C<:bsd_glob> export tag exports bsd_glob() and the constants listed below. It also overrides glob() in the calling package with one that behaves like bsd_glob() with regard to spaces (the space is treated as part of a file name), but supports iteration in scalar context; i.e., it preserves the core function's feature of returning the next item each time it is called. =head3 C<:glob> The C<:glob> tag, now discouraged, is the old version of C<:bsd_glob>. It exports the same constants and functions, but its glob() override does not support iteration; it returns the last file name in scalar context. That means this will loop forever: use File::Glob ':glob'; while (my $file = <* copy.txt>) { ... } =head3 C This function, which is included in the two export tags listed above, takes one or two arguments. The first is the glob pattern. The second is a set of flags ORed together. The available flags are listed below under L. If the second argument is omitted, C (or C on VMS and DOSish systems) is used by default. =head3 C<:nocase> and C<:case> These two export tags globally modify the default flags that bsd_glob() and, except on VMS, Perl's built-in C operator use. C is turned on or off, respectively. =head3 C The csh_glob() function can also be exported, but you should not use it directly unless you really know what you are doing. It splits the pattern into words and feeds each one to bsd_glob(). Perl's own glob() function uses this internally. =head2 POSIX FLAGS The POSIX defined flags for bsd_glob() are: =over 4 =item C Force bsd_glob() to return an error when it encounters a directory it cannot open or read. Ordinarily bsd_glob() continues to find matches. =item C Make bsd_glob() return an error (GLOB_NOSPACE) when the pattern expands to a size bigger than the system constant C (usually found in limits.h). If your system does not define this constant, bsd_glob() uses C or C<_POSIX_ARG_MAX> where available (in that order). You can inspect these values using the standard C extension. =item C Each pathname that is a directory that matches the pattern has a slash appended. =item C By default, file names are assumed to be case sensitive; this flag makes bsd_glob() treat case differences as not significant. =item C If the pattern does not match any pathname, then bsd_glob() returns a list consisting of only the pattern. If C is set, its effect is present in the pattern returned. =item C By default, the pathnames are sorted in ascending ASCII order; this flag prevents that sorting (speeding up bsd_glob()). =back The FreeBSD extensions to the POSIX standard are the following flags: =over 4 =item C Pre-process the string to expand C<{pat,pat,...}> strings like csh(1). The pattern '{}' is left unexpanded for historical reasons (and csh(1) does the same thing to ease typing of find(1) patterns). =item C Same as C but it only returns the pattern if it does not contain any of the special characters "*", "?" or "[". C is provided to simplify implementing the historic csh(1) globbing behaviour and should probably not be used anywhere else. =item C Use the backslash ('\') character for quoting: every occurrence of a backslash followed by a character in the pattern is replaced by that character, avoiding any special interpretation of the character. (But see below for exceptions on DOSISH systems). =item C Expand patterns that start with '~' to user name home directories. =item C For convenience, C is a synonym for C. =back The POSIX provided C, C, and the FreeBSD extensions C, and C flags have not been implemented in the Perl version because they involve more complex interaction with the underlying C structures. The following flag has been added in the Perl implementation for csh compatibility: =over 4 =item C If C is not in effect, sort filenames is alphabetical order (case does not matter) rather than in ASCII order. =back =head1 DIAGNOSTICS bsd_glob() returns a list of matching paths, possibly zero length. If an error occurred, &File::Glob::GLOB_ERROR will be non-zero and C<$!> will be set. &File::Glob::GLOB_ERROR is guaranteed to be zero if no error occurred, or one of the following values otherwise: