Result:
found more than 514 distributions - search limited to the first 2001 files matching your query ( run in 2.470 )


App-PTP

 view release on metacpan or  search on metacpan

lib/App/PTP/Args.pm  view on Meta::CPAN

    'sort' => sub { push @{$cur_pipeline}, ['sort', \&do_sort, {%modes}] },
    'numeric-sort|ns' => sub {
      my $opt = {%modes, comparator => \'numeric'};
      push @{$cur_pipeline}, ['numeric-sort', \&do_sort, $opt];
    },
    'locale-sort|ls' => sub {
      my $opt = {%modes, comparator => \'locale'};
      push @{$cur_pipeline}, ['locale-sort', \&do_sort, $opt];
    },
    'semver-sort|ss' => sub {
      my $opt = {%modes, comparator => \'semver'};
      push @{$cur_pipeline}, ['semver-sort', \&do_sort, $opt];
    },

 view all matches for this distribution


App-Phoebe

 view release on metacpan or  search on metacpan

t/test.pl  view on Meta::CPAN

  use Config;
  my $secure_perl_path = $Config{perlpath};
  my @args = ("blib/script/phoebe",
	      # The test files containing hostnames are UTF-8 encoded, thus
	      # $host and @host are unicode strings. Command line parsing
	      # expects them encoded in the current locale, however.
	      (map { "--host=" . encode(locale => $_) } @hosts),
	      "--port=$port",
	      "--log_level=warn", # set to debug if you are bug hunting?
	      "--cert_file=t/cert.pem",
	      "--key_file=t/key.pem",
	      "--wiki_dir=$dir",
	      "--wiki_mime_type=image/jpeg",
	      (map { "--wiki_page=" . encode(locale => $_) } @pages),
	      (map { "--wiki_space=" . encode(locale => $_) } @spaces));
  exec($secure_perl_path, @args) or die "Cannot exec: $!";
}

sub query_gemini {
  my $query = shift;

 view all matches for this distribution


App-PickRandomLines

 view release on metacpan or  search on metacpan

script/pick  view on Meta::CPAN

#L</FORMAT_PRETTY_TABLE_BACKEND>, to be passed to
#L<Text::Table::Any>C<::table()>'s C<backend_opts> argument. It should be a hash
#encoded in JSON, e.g.:
#
# # keep table aligned in the presence of wide Unicode characters
# % FORMAT_PRETTY_TABLE_BACKEND=Text::Table::More FORMAT_PRETTY_TABLE_BACKEND_OPTS='{"wide_char":1}' tabledata locale::JP::City::MIC --page
#
#=head2 FORMAT_PRETTY_TABLE_COLUMN_ORDERS => array (json)
#
#Set the default of C<table_column_orders> in C<format_options> in result
#metadata, similar to what's implemented in L<Perinci::Result::Format> and

 view all matches for this distribution


App-RegexpPatternUtils

 view release on metacpan or  search on metacpan

script/list-regexp-pattern-patterns  view on Meta::CPAN


Perinci::CmdLine::Any->new(
    url => '/main/list_regexp_pattern_patterns',
    read_config => 0,
    read_env => 0,
    use_locale => 1,
)->run;

# ABSTRACT: List Regexp::Pattern::* patterns
# PODNAME: list-regexp-pattern-patterns

 view all matches for this distribution


App-RetroPAN

 view release on metacpan or  search on metacpan

t/retropan.t  view on Meta::CPAN

            ETHER/Test-DistManifest-1.012
            DOHERTY/Dist-Zilla-Plugin-Test-DistManifest-2.000004
            VPIT/autovivification-0.14
            THALJEF/criticism-1.02
            DOHERTY/utf8-all-0.015
            HIDEAKIO/autolocale-0.07
            CHOCOLATE/B-Hooks-OP-Annotation-0.44
            CHOCOLATE/true-0.18
            DEXTER/namespace-functions-0.0101
            VPIT/subs-auto-0.08
            DCONWAY/Toolkit-0.0.2

 view all matches for this distribution


App-RoboBot

 view release on metacpan or  search on metacpan

lib/App/RoboBot/Plugin/Core/Compare.pm  view on Meta::CPAN

=head2 lt

=head3 Description

String ordinality test. Returns 1 if ``a`` sorts before ``b`` according to the
collation rules of the locale in which the bot is running. Returns 0 otherwise.

=head3 Usage

<operand a> <operand b>

lib/App/RoboBot/Plugin/Core/Compare.pm  view on Meta::CPAN

=head2 gt

=head3 Description

String ordinality test. Returns 1 if ``a`` sorts after ``b`` according to the
collation rules of the locale in which the bot is running. Returns 0 otherwise.

=head3 Usage

<operand a> <operand b>

lib/App/RoboBot/Plugin/Core/Compare.pm  view on Meta::CPAN

=head2 cmp

=head3 Description

String comparison. Returns -1 if ``a`` collates before ``b``, 1 if ``b``
collates first, and 0 if they are equal. Collation uses the locale under which
the bot is running.

=head3 Usage

<operand a> <operand b>

 view all matches for this distribution


App-SahUtils

 view release on metacpan or  search on metacpan

script/coerce-with-sah  view on Meta::CPAN

                          second => 0,
                          year => 2016,
                        },
     local_rd_days   => 736106,
     local_rd_secs   => 0,
     locale          => bless({
                          am_pm_abbreviated               => ["AM", "PM"],
                          available_formats               => {
                                                               "Bh"                => "h B",
                                                               "Bhm"               => "h:mm B",
                                                               "Bhms"              => "h:mm:ss B",

script/coerce-with-sah  view on Meta::CPAN

                          glibc_date_format               => "%m/%d/%Y",
                          glibc_datetime_format           => "%a %d %b %Y %r %Z",
                          glibc_time_12_format            => "%I:%M:%S %p",
                          glibc_time_format               => "%r",
                          language                        => "English",
                          locale_data                     => {
                                                               am_pm_abbreviated               => 'fix',
                                                               available_formats               => 'fix',
                                                               code                            => "en-US",
                                                               date_format_full                => "EEEE, MMMM d, y",
                                                               date_format_long                => "MMMM d, y",

script/coerce-with-sah  view on Meta::CPAN

                        }, "DateTime::TimeZone::Asia::Jakarta"),
     utc_rd_days     => 736105,
     utc_rd_secs     => 61200,
     utc_year        => 2017,
   }, "DateTime");
   $a->{locale}{locale_data}{am_pm_abbreviated} = $a->{locale}{am_pm_abbreviated};
   $a->{locale}{locale_data}{available_formats} = $a->{locale}{available_formats};
   $a->{locale}{locale_data}{day_format_abbreviated} = $a->{locale}{day_format_abbreviated};
   $a->{locale}{locale_data}{day_format_narrow} = $a->{locale}{day_format_narrow};
   $a->{locale}{locale_data}{day_format_wide} = $a->{locale}{day_format_wide};
   $a->{locale}{locale_data}{day_stand_alone_abbreviated} = $a->{locale}{day_stand_alone_abbreviated};
   $a->{locale}{locale_data}{day_stand_alone_narrow} = $a->{locale}{day_stand_alone_narrow};
   $a->{locale}{locale_data}{day_stand_alone_wide} = $a->{locale}{day_stand_alone_wide};
   $a->{locale}{locale_data}{era_abbreviated} = $a->{locale}{era_abbreviated};
   $a->{locale}{locale_data}{era_narrow} = $a->{locale}{era_narrow};
   $a->{locale}{locale_data}{era_wide} = $a->{locale}{era_wide};
   $a->{locale}{month_format_abbreviated} = $a->{locale}{locale_data}{month_format_abbreviated};
   $a->{locale}{month_format_narrow} = $a->{locale}{locale_data}{month_format_narrow};
   $a->{locale}{month_format_wide} = $a->{locale}{locale_data}{month_format_wide};
   $a->{locale}{month_stand_alone_abbreviated} = $a->{locale}{locale_data}{month_stand_alone_abbreviated};
   $a->{locale}{month_stand_alone_narrow} = $a->{locale}{locale_data}{month_stand_alone_narrow};
   $a->{locale}{month_stand_alone_wide} = $a->{locale}{locale_data}{month_stand_alone_wide};
   $a->{locale}{quarter_format_abbreviated} = $a->{locale}{locale_data}{quarter_format_abbreviated};
   $a->{locale}{quarter_format_narrow} = $a->{locale}{locale_data}{quarter_format_narrow};
   $a->{locale}{quarter_format_wide} = $a->{locale}{locale_data}{quarter_format_wide};
   $a->{locale}{quarter_stand_alone_abbreviated} = $a->{locale}{locale_data}{quarter_stand_alone_abbreviated};
   $a->{locale}{quarter_stand_alone_narrow} = $a->{locale}{locale_data}{quarter_stand_alone_narrow};
   $a->{locale}{quarter_stand_alone_wide} = $a->{locale}{locale_data}{quarter_stand_alone_wide};
   $a;
 }

=head2 Coerce multiple data

 view all matches for this distribution


App-Sandy

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

ALLOC_THREAD_KEY|5.005003||Viu
ALT_DIGITS|5.027010||Viu
amagic_call|5.003007|5.003007|u
amagic_cmp|5.009003||Viu
amagic_cmp_desc|5.031011||Viu
amagic_cmp_locale|5.009003||Viu
amagic_cmp_locale_desc|5.031011||Viu
amagic_deref_call|5.013007|5.013007|u
amagic_i_ncmp|5.009003||Viu
amagic_i_ncmp_desc|5.031011||Viu
amagic_is_enabled|5.015008||Viu
amagic_ncmp|5.009003||Viu

ppport.h  view on Meta::CPAN

CHARBITS|5.011002|5.011002|Vn
CHARSET_PAT_MODS|5.013010||Viu
chdir|5.005000||Viu
checkcomma|5.003007||Viu
check_end_shift|5.009005||Viu
check_locale_boundary_crossing|5.015006||Viu
CHECK_MALLOC_TAINT|5.008001||Viu
CHECK_MALLOC_TOO_LATE_FOR|5.008001||Viu
check_offset_max|5.005000||Viu
check_offset_min|5.005000||Viu
check_substr|5.005000||Viu

ppport.h  view on Meta::CPAN

cMETHOPx_rclass|5.021007||Viu
cmpchain_extend|5.031011||Viu
cmpchain_finish|5.031011||Viu
cmpchain_start|5.031011||Viu
cmp_desc|5.031011||Viu
cmp_locale_desc|5.031011||Viu
cntrl_to_mnemonic|5.021004||cVniu
CODESET|5.027010||Viu
COMBINING_DOT_ABOVE_UTF8|5.029008||Viu
COMBINING_GRAVE_ACCENT_UTF8|5.017004||Viu
COMMIT|5.009005||Viu

ppport.h  view on Meta::CPAN

edit_distance|5.023008||Vniu
EIGHT_BIT_UTF8_TO_NATIVE|5.023003||Viu
ELEMENT_RANGE_MATCHES_INVLIST|5.023002||Viu
EMBEDMYMALLOC|5.006000||Viu
emulate_cop_io|||xciu
emulate_setlocale|5.027009||Vniu
END|5.003007||Viu
END_EXTERN_C|5.005000|5.003007|pV
endgrent|5.009000||Viu
ENDGRENT_R_HAS_FPTR|5.008000||Viu
ENDGRENT_R_PROTO|5.008000|5.008000|Vn

ppport.h  view on Meta::CPAN

FmLINES|5.003007||Viu
fold_constants|5.003007||Viu
foldEQ|5.013002|5.013002|n
foldEQ_latin1|5.013008||cVnu
foldEQ_latin1_s2_folded|5.029007||Vniu
foldEQ_locale|5.013002|5.013002|n
FOLDEQ_LOCALE|5.019009||cV
FOLDEQ_S1_ALREADY_FOLDED|5.015004||cV
FOLDEQ_S1_FOLDS_SANE|5.021008||cV
FOLDEQ_S2_ALREADY_FOLDED|5.015004||cV
FOLDEQ_S2_FOLDS_SANE|5.021008||cV

ppport.h  view on Meta::CPAN

I8_TO_NATIVE|5.015006||Viu
I8_TO_NATIVE_UTF8|5.019004||Viu
I8TYPE|5.006000|5.006000|Vn
I_ARPA_INET|5.005000|5.005000|Vn
ibcmp|5.003007|5.003007|
ibcmp_locale|5.004000|5.004000|
ibcmp_utf8|5.007003|5.007003|
I_CRYPT|5.008000|5.008000|Vn
I_DBM|5.032001|5.032001|Vn
I_DIRENT|5.003007|5.003007|Vn
I_DLFCN|5.003007|5.003007|Vn

ppport.h  view on Meta::CPAN

isIDFIRST_utf8|5.031005|5.031005|
isIDFIRST_utf8_safe|5.025009|5.006000|p
isIDFIRST_uvchr|5.023009|5.006000|p
isinfnan|5.021004|5.021004|n
isinfnansv|5.021005||Vi
_is_in_locale_category|5.021001||cViu
IS_IN_SOME_FOLD_L1|5.033005||Viu
is_invariant_string|5.021007|5.011000|pn
is_invlist|5.029002||Vniu
is_LARGER_NON_CHARS_utf8|5.035003||Viu
is_LAX_VERSION|5.011004||Viu

ppport.h  view on Meta::CPAN

PERL_SCRIPT_MODE|5.004005||Viu
PERL_SEEN_HV_FUNC_H|5.017010||Viu
PERL_SEEN_HV_MACRO_H|5.027001||Viu
PERL_SET_CONTEXT|5.006000||Viu
PERL_SET_INTERP|5.006000||Viu
Perl_setlocale|5.027002|5.027002|n
PERL_SET_PHASE|5.015001||Viu
PERL_SET_THX|5.006000||Viu
Perl_sharepvn|5.006000||Viu
PERL_SHORT_MAX|5.003007|5.003007|p
PERL_SHORT_MIN|5.003007|5.003007|p

ppport.h  view on Meta::CPAN

PL_copline||5.003007|ponu
PL_cop_seqmax|5.005000||Viu
PL_cshlen|5.005000||Viu
PL_curcop|5.004005|5.003007|p
PL_curcopdb|5.005000||Viu
PL_curlocales|5.027009||Viu
PL_curpad|5.005000|5.005000|x
PL_curpm|5.005000||Viu
PL_curpm_under|5.025007||Viu
PL_curstack|5.005000||Viu
PL_curstackinfo|5.005000||Viu

ppport.h  view on Meta::CPAN

PL_in_my||5.003007|ponu
PL_in_my_stash||5.005000|ponu
PL_inplace|5.005000||Viu
PL_in_some_fold|5.029007||Viu
PL_internal_random_state|5.027004||Viu
PL_in_utf8_COLLATE_locale|5.025002||Viu
PL_in_utf8_CTYPE_locale|5.019009||Viu
PL_in_utf8_turkic_locale|5.029008||Viu
PL_isarev|5.009005||Viu
PL_keyword_plugin|5.011002|5.011002|x
PL_known_layers|5.007003||Viu
PL_langinfo_buf|5.027004||Viu
PL_langinfo_bufsize|5.027004||Viu

ppport.h  view on Meta::CPAN

PL_lc_numeric_mutex_depth|5.027009||Viu
PL_lex_state||5.003007|ponu
PL_lex_stuff||5.003007|ponu
PL_linestr||5.003007|ponu
PL_LIO|5.006000||Viu
PL_locale_utf8ness|5.027009||Viu
PL_localizing|5.005000||Viu
PL_localpatches|5.005000||Viu
PL_lockhook|5.007003||Viu
PL_main_cv|5.005000||Viu
PL_main_root|5.005000||Viu

ppport.h  view on Meta::CPAN

PL_scopestack_ix|5.005000||Viu
PL_scopestack_max|5.005000||Viu
PL_scopestack_name|5.011002||Viu
PL_SCX_invlist|5.027008||Viu
PL_secondgv|5.005000||Viu
PL_setlocale_buf|5.027009||Viu
PL_setlocale_bufsize|5.027009||Viu
PL_sharehook|5.007003||Viu
PL_sighandler1p|5.031007||Viu
PL_sighandler3p|5.031007||Viu
PL_sighandlerp|5.005000||Viu
PL_signalhook|5.013002||Viu

ppport.h  view on Meta::CPAN

PL_utf8_charname_begin|5.017006||Viu
PL_utf8_charname_continue|5.017006||Viu
PL_utf8_foldclosures|5.013007||Viu
PL_utf8_idcont|5.008000||Viu
PL_utf8_idstart|5.008000||Viu
PL_utf8locale|5.008001||Viu
PL_utf8_mark|5.006000||Viu
PL_utf8_perl_idcont|5.017008||Viu
PL_utf8_perl_idstart|5.015004||Viu
PL_utf8_tofold|5.007003||Viu
PL_utf8_tolower|5.006000||Viu

ppport.h  view on Meta::CPAN

PL_vtbl_taint|5.015000||Viu
PL_vtbl_utf8|5.015000||Viu
PL_vtbl_uvar|5.015000||Viu
PL_vtbl_vec|5.015000||Viu
PL_warnhook|5.005000||Viu
PL_warn_locale|5.021008||Viu
PL_watchaddr|5.006000||Viu
PL_watchok|5.006000||Viu
PL_WB_invlist|5.021009||Viu
PL_wcrtomb_ps|5.031010||Viu
PL_XPosix_ptrs|5.017008||Viu

ppport.h  view on Meta::CPAN

prepare_SV_for_RV|5.010001||Viu
prescan_version|5.011004|5.011004|
PRESCAN_VERSION|5.019008||Viu
PREV_RANGE_MATCHES_INVLIST|5.023002||Viu
printbuf|5.009004||Viu
print_bytes_for_locale|5.027002||Viu
print_collxfrm_input_and_return|5.025004||Viu
printf|5.003007||Viu
PRINTF_FORMAT_NULL_OK|5.009005|5.009005|Vn
printf_nocontext|5.007001||vdVnu
PRIVLIB|5.003007|5.003007|Vn

ppport.h  view on Meta::CPAN

ReREFCNT_dec|5.005000||Viu
ReREFCNT_inc|5.005000||Viu
RESTORE_ERRNO|5.010001||Vi
RESTORE_LC_NUMERIC|5.021010|5.021010|p
restore_magic|5.009003||Viu
restore_switched_locale|5.027009||Viu
RE_SV_DUMPLEN|5.009004||Viu
RE_SV_ESCAPE|5.009004||Viu
RE_SV_TAIL|5.009004||Viu
RETPUSHNO|5.003007||Viu
RETPUSHUNDEF|5.003007||Viu

ppport.h  view on Meta::CPAN

sethostent|5.005000||Viu
SETHOSTENT_R_PROTO|5.008000|5.008000|Vn
SETi|5.003007||Viu
setjmp|5.005000||Viu
setlinebuf|5.005000||Viu
setlocale|5.009000||Viu
setlocale_debug_string|5.027002||Vniu
SETLOCALE_LOCK|5.033005||Viu
SETLOCALE_R_PROTO|5.008000|5.008000|Vn
SETLOCALE_UNLOCK|5.033005||Viu
SET_MARK_OFFSET|5.006000||Viu
setmode|5.005000||Viu

ppport.h  view on Meta::CPAN

SS_ADD_UV|5.017007||Viu
SS_BUFFEROVF|5.021009||Viu
ssc_add_range|5.019005||Viu
ssc_and|5.019005||Viu
ssc_anything|5.019005||Viu
ssc_clear_locale|5.019005||Vniu
ssc_cp_and|5.019005||Viu
ssc_finalize|5.019005||Viu
SSCHECK|5.003007||Viu
ssc_init|5.019005||Viu
ssc_intersection|5.019005||Viu

ppport.h  view on Meta::CPAN

ST_DEV_SIZE|5.035004|5.035004|Vn
stdin|5.003007||Viu
STDIO_PTR_LVAL_SETS_CNT|5.007001|5.007001|Vn
STDIO_PTR_LVALUE|5.006000|5.006000|Vn
STDIO_STREAM_ARRAY|5.006000|5.006000|Vn
stdize_locale|5.007001||Viu
stdout|5.003007||Viu
stdoutf|5.005000||Viu
STD_PAT_MODS|5.009005||Viu
STD_PMMOD_FLAGS_CLEAR|5.013006||Viu
ST_INO_SIGN|5.015002|5.015002|Vn

ppport.h  view on Meta::CPAN

sv_clean_all|5.003007||Vi
sv_clean_objs|5.003007||Vi
sv_clear|5.003007|5.003007|
sv_cmp|5.003007|5.003007|
sv_cmp_flags|5.013006|5.013006|
sv_cmp_locale|5.004000|5.004000|
sv_cmp_locale_flags|5.013006|5.013006|
sv_collxfrm|5.013006||V
sv_collxfrm_flags|5.013006|5.013006|
SvCOMPILED|5.003007||Viu
SvCOMPILED_off|5.003007||Viu
SvCOMPILED_on|5.003007||Viu

ppport.h  view on Meta::CPAN

SvVSTRING_mg|5.009004|5.003007|p
SvWEAKREF|5.006000||Viu
SvWEAKREF_off|5.006000||Viu
SvWEAKREF_on|5.006000||Viu
swallow_bom|5.006001||Viu
switch_category_locale_to_template|5.027009||Viu
SWITCHSTACK|5.003007||Viu
switch_to_global_locale|5.027009|5.003007|pn
sync_locale|5.027009|5.003007|pn
sys_init3|||cnu
sys_init|||cnu
sys_intern_clear|5.006001||Vu
sys_intern_dup|5.006000||Vu
sys_intern_init|5.006001||Vu

ppport.h  view on Meta::CPAN

T_FMT_AMPM|5.027010||Viu
THIS|5.003007|5.003007|V
THOUSEP|5.027010||Viu
THR|5.005000||Viu
THREAD_CREATE_NEEDS_STACK|5.007002||Viu
thread_locale_init|5.027009|5.027009|xnu
thread_locale_term|5.027009|5.027009|xnu
THREAD_RET_TYPE|5.005000||Viu
tied_method|5.013009||vViu
TIED_METHOD_ARGUMENTS_ON_STACK|5.013009||Viu
TIED_METHOD_MORTALIZE_NOT_NEEDED|5.013009||Viu
TIED_METHOD_SAY|5.013009||Viu

ppport.h  view on Meta::CPAN

WARN_PARENTHESIS|5.006000|5.003007|p
WARN_PIPE|5.006000|5.003007|p
WARN_PORTABLE|5.006000|5.003007|p
WARN_PRECEDENCE|5.006000|5.003007|p
WARN_PRINTF|5.006000|5.003007|p
_warn_problematic_locale|5.021008||cVniu
WARN_PROTOTYPE|5.006000|5.003007|p
WARN_QW|5.006000|5.003007|p
WARN_RECURSION|5.006000|5.003007|p
WARN_REDEFINE|5.006000|5.003007|p
WARN_REDUNDANT|5.021002|5.021002|

ppport.h  view on Meta::CPAN

WHILEM_tb_p8|5.033003||Viu
WHILEM_tb_pb|5.033003||Viu
WIDEST_UTYPE|5.015004|5.003007|poVnu
win32_croak_not_implemented|5.017006||Vniu
WIN32SCK_IS_STDSCK|5.007001||Viu
win32_setlocale|5.027006||Viu
withinCOUNT|5.031004||Viu
withinCOUNT_KNOWN_VALID|5.033005||Viu
WITH_LC_NUMERIC_SET_TO_NEEDED|5.031003|5.031003|
WITH_LC_NUMERIC_SET_TO_NEEDED_IN|5.031003|5.031003|
with_queued_errors|5.013001||Viu

ppport.h  view on Meta::CPAN

                                                  (s)[1])))                 \
            : is ## macro ## _utf8(s))

/* A few of the early functions are broken.  For these and the non-LC case,
 * machine generated code is substituted.  But that code doesn't work for
 * locales.  This is just like the above macro, but at the end, we call the
 * macro we've generated for the above 255 case, which is correct since locale
 * isn't involved.  This will generate extra code to handle the 0-255 inputs,
 * but hopefully it will be optimized out by the C compiler.  But just in case
 * it isn't, this macro is only used on the few versions that are broken */

#define D_PPP_IS_GENERIC_LC_UTF8_SAFE_BROKEN(s, e, macro)                   \

ppport.h  view on Meta::CPAN


#ifdef EBCDIC

/* This is the first version where these macros are fully correct on EBCDIC
 * platforms.  Relying on the C library functions, as earlier releases did,
 * causes problems with locales */
# if (PERL_BCDVERSION < 0x5022000)
#  undef isALNUM
#  undef isALNUM_A
#  undef isALNUM_L1
#  undef isALNUMC

ppport.h  view on Meta::CPAN


#else   /* Above is EBCDIC; below is ASCII */

# if (PERL_BCDVERSION < 0x5004000)
/* The implementation of these in older perl versions can give wrong results if
 * the C program locale is set to other than the C locale */
#  undef isALNUM
#  undef isALNUM_A
#  undef isALPHA
#  undef isALPHA_A
#  undef isDIGIT

ppport.h  view on Meta::CPAN

            return TRUE;
        }
    }
#else
    /* older perls don't have PL_numeric_radix_sv so the radix
     * must manually be requested from locale.h
     */
#include <locale.h>
    dTHR;  /* needed for older threaded perls */
    struct lconv *lc = localeconv();
    char *radix = lc->decimal_point;
    if (radix && IN_LOCALE) {
        STRLEN len = strlen(radix);
        if (*sp + len <= send && memEQ(*sp, radix, len)) {
            *sp += len;

ppport.h  view on Meta::CPAN

        }
    }
#endif
#endif /* USE_LOCALE_NUMERIC */
    /* always try "." if numeric radix didn't match because
     * we may have data from different locales mixed */
    if (*sp < send && **sp == '.') {
        ++*sp;
        return TRUE;
    }
    return FALSE;

ppport.h  view on Meta::CPAN

#  define DECLARATION_FOR_LC_NUMERIC_MANIPULATION char *LoC_
#endif

#ifndef STORE_NUMERIC_SET_STANDARD
#  define STORE_NUMERIC_SET_STANDARD()   \
	 LoC_ = savepv(setlocale(LC_NUMERIC, NULL));  \
	 SAVEFREEPV(LoC_);                            \
	 setlocale(LC_NUMERIC, "C");
#endif

#ifndef RESTORE_LC_NUMERIC
#  define RESTORE_LC_NUMERIC()           \
	 setlocale(LC_NUMERIC, LoC_);
#endif

#    else
#ifndef DECLARATION_FOR_LC_NUMERIC_MANIPULATION
#  define DECLARATION_FOR_LC_NUMERIC_MANIPULATION

ppport.h  view on Meta::CPAN

#ifndef UNLOCK_LC_NUMERIC_STANDARD
#  define UNLOCK_LC_NUMERIC_STANDARD     UNLOCK_NUMERIC_STANDARD
#endif

/* If this doesn't exist, it's not needed, so is void noop */
#ifndef switch_to_global_locale
#  define switch_to_global_locale()
#endif

/* Originally, this didn't return a value, but in perls like that, the value
 * should always be TRUE.  Add a return to Perl_sync_locale() when it's
 * available.  And actually do a sync when its not, if locales are available on
 * this system. */
#ifdef sync_locale
#  if (PERL_BCDVERSION < 0x5027009)
#    if (PERL_BCDVERSION >= 0x5021003)
#      undef sync_locale
#      define sync_locale() (Perl_sync_locale(aTHX), 1)
#    elif defined(sync_locale)  /* These should only be the 5.20 maints*/
#      undef sync_locale        /* Just copy their defn and return 1 */
#      define sync_locale() (new_ctype(setlocale(LC_CTYPE, NULL)),        \
                             new_collate(setlocale(LC_COLLATE, NULL)),    \
                             set_numeric_local(),                         \
                             new_numeric(setlocale(LC_NUMERIC, NULL)),    \
                             1)
#    elif defined(new_ctype) && defined(LC_CTYPE)
#      define sync_locale() (new_ctype(setlocale(LC_CTYPE, NULL)), 1)
#    endif
#  endif
#endif
#ifndef sync_locale
#  define sync_locale()                  1
#endif

#endif /* _P_P_PORTABILITY_H_ */

/* End of File ppport.h */

 view all matches for this distribution


App-SlideServer

 view release on metacpan or  search on metacpan

share/public/highlight/highlight.min.js  view on Meta::CPAN

begin:t,end:a,contains:["self"]
},o=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[",a,{contains:[n],
relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,
literal:"true false nil",
keyword:"and break do else elseif end for goto if in local not or repeat return then until while",
built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring mo...
},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",
contains:[e.inherit(e.TITLE_MODE,{
begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",
begin:"\\(",endsWithParent:!0,contains:o}].concat(o)
},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",

 view all matches for this distribution


App-SocialCalc-Multiplayer

 view release on metacpan or  search on metacpan

socialcalc/socialcalc2demo-0-8-1.html  view on Meta::CPAN

'<dt>UPPER(text)<dd>Returns the text value with all lowercase characters converted to uppercase. '+
'<dt>VALUE(value)<dd>Converts the specified text value into a numeric value. '+
'Various forms that look like numbers (including digits followed by %, forms that look like '+
'dates, etc.) are handled. '+
'This may not handle all of the forms accepted by other spreadsheets and may be '+
'locale dependent. '+
'<dt>VAR(value, value, ...)<dd>Returns the sample variance of the numeric values. '+
'<dt>VARP(value, value, ...)<dd>Returns the variance of the numeric values. '+
'<dt>VLOOKUP(value, range, col, [rangelookup])<dd>Look for the matching value for the given value in the '+
'range and return the corresponding value in the cell specified by the column offset. '+
'If rangelookup is 1 (the default) and not 0, match if within numeric brackets (match&lt;=value) instead of exact match. '+

 view all matches for this distribution


App-SpreadRevolutionaryDate

 view release on metacpan or  search on metacpan

lib/App/SpreadRevolutionaryDate.pm  view on Meta::CPAN

      $special_birthday_args{special_birthday_gemini} = $config->special_birthday_gemini if $config->special_birthday_gemini;
      $special_birthday_args{special_birthday_prefix} = $config->special_birthday_prefix if $config->special_birthday_prefix;
      $special_birthday_args{special_birthday_plural} = $config->special_birthday_plural if $config->special_birthday_plural;
      $special_birthday_args{special_birthday_gender} = $config->special_birthday_gender if $config->special_birthday_gender;
  }
  my $msgmaker = $msgmaker_class->new(locale => $config->locale, %msgmaker_args, %special_birthday_args);

  return $class->$orig(config => $config, targets => {}, msgmaker => $msgmaker);
};


 view all matches for this distribution


App-Sqitch

 view release on metacpan or  search on metacpan

lib/App/Sqitch.pm  view on Meta::CPAN

    lazy     => 1,
    default  => sub {
        $ENV{ SQITCH_ORIG_SYSUSER } || do {
            # Adapted from User.pm.
            require Encode::Locale;
            return Encode::decode( locale => getlogin )
                || Encode::decode( locale => scalar getpwuid( $< ) )
                || $ENV{ LOGNAME }
                || $ENV{ USER }
                || $ENV{ USERNAME }
                || try {
                    require Win32;
                    Encode::decode( locale => Win32::LoginName() )
                };
        };
    },
);

lib/App/Sqitch.pm  view on Meta::CPAN

                try { require Win32API::Net } || return $sysname;
                # https://stackoverflow.com/q/12081246/79202
                Win32API::Net::UserGetInfo( $ENV{LOGONSERVER}, $sysname, 10, my $info = {} );
                return $sysname unless $info->{fullName};
                require Encode::Locale;
                return Encode::decode( locale => $info->{fullName} );
            }
            require User::pwent;
            my $name = User::pwent::getpwnam($sysname) || return $sysname;
            $name = ($name->gecos)[0] || return $sysname;
            require Encode::Locale;
            return Encode::decode( locale => $name );
        };
    }
);

has user_email => (

 view all matches for this distribution


App-Stacktrace

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

aTHX|5.006000||p
add_data|||n
addmad|||
allocmy|||
amagic_call|||
amagic_cmp_locale|||
amagic_cmp|||
amagic_i_ncmp|||
amagic_ncmp|||
any_dup|||
ao|||

ppport.h  view on Meta::CPAN

hv_store_ent||5.004000|
hv_store_flags||5.008000|
hv_stores|5.009004||p
hv_store|||
hv_undef|||
ibcmp_locale||5.004000|
ibcmp_utf8||5.007003|
ibcmp|||
incline|||
incpush_if_exists|||
incpush_use_sep|||

ppport.h  view on Meta::CPAN

stack_grow|||
start_force|||
start_glob|||
start_subparse||5.004000|
stashpv_hvname_match||5.011000|
stdize_locale|||
store_cop_label|||
strEQ|||
strGE|||
strGT|||
strLE|||

ppport.h  view on Meta::CPAN

sv_catxmlsv|||
sv_chop|||
sv_clean_all|||
sv_clean_objs|||
sv_clear|||
sv_cmp_locale||5.004000|
sv_cmp|||
sv_collxfrm|||
sv_compile_2op||5.008001|
sv_copypv||5.007003|
sv_dec|||

ppport.h  view on Meta::CPAN

            return TRUE;
        }
    }
#else
    /* older perls don't have PL_numeric_radix_sv so the radix
     * must manually be requested from locale.h
     */
#include <locale.h>
    dTHR;  /* needed for older threaded perls */
    struct lconv *lc = localeconv();
    char *radix = lc->decimal_point;
    if (radix && IN_LOCALE) {
        STRLEN len = strlen(radix);
        if (*sp + len <= send && memEQ(*sp, radix, len)) {
            *sp += len;

ppport.h  view on Meta::CPAN

        }
    }
#endif
#endif /* USE_LOCALE_NUMERIC */
    /* always try "." if numeric radix didn't match because
     * we may have data from different locales mixed */
    if (*sp < send && **sp == '.') {
        ++*sp;
        return TRUE;
    }
    return FALSE;

 view all matches for this distribution


App-Sys-Info

 view release on metacpan or  search on metacpan

lib/App/Sys/Info.pm  view on Meta::CPAN

use constant CP_UTF8      => 65_001;
use constant LAST_ELEMENT =>     -1;

use Carp                 qw( croak    );
use Format::Human::Bytes;
use POSIX                qw( locale_h );
use Text::Table          qw();
use Time::Duration       qw( duration_exact  );
use Sys::Info            qw();
use Sys::Info::Constants qw( NEW_PERL OSID );

lib/App/Sys/Info.pm  view on Meta::CPAN

    my $class  = shift;
    my $i      = Sys::Info->new;
    my $loc    = do {
        my $rv;
        eval {
            $rv = setlocale( LC_CTYPE );
            1;
        } or do {
            my $error = $@ || 'Unknown error';
            warn "Unable to collect the locale information: $error";
            $rv = '';
        };
        $rv;
    };
    my $self   = {

 view all matches for this distribution


App-Test-Generator

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

      10% passing reports, indicating a likely broken release rather
      than a version- or platform-specific compatibility issue. Likely
      causes listed in evidence: missing file in tarball, broken
      Makefile.PL, or undeclared dependency. Integrated into
      detect_root_causes() where it is evaluated first and sorted by
      confidence alongside the existing OS, locale, and Perl version
      cliff detectors.
    - Fixed blib/ paths appearing in coverage table instead of lib/
      paths. Devel::Cover instruments blib/ during testing; paths are
      now normalised to lib/ for display, with deduplication against
      any native lib/ entry.

 view all matches for this distribution


App-TimeClock

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


0.11   2016-12-30 10:18
       Fixed Issue #16 by supporting new default location of the timelog file in Emacs 25.

0.12   2017-01-02 10:28
       Fixed Issue #17 concerning unit tests failing when locale is not en_US.UTF-8

0.13   2017-01-04 11:14
       Fixed Issue #18 by implementing support for perl version pre 5.10. Also all CPAN Testers tests sould be green.
       Fixed Issue #20 by adding use strict/warnings, this should remove all Kwalitee issues.

 view all matches for this distribution


App-Twimap

 view release on metacpan or  search on metacpan

lib/App/Twimap/Tweet.pm  view on Meta::CPAN

has 'expand_urls' => ( is => 'ro', isa => 'Bool',    default  => 1 );
has 'oembed_urls' => ( is => 'ro', isa => 'Bool',    default  => 1 );

my $_parser = DateTime::Format::Strptime->new(
    pattern  => '%a %b %d %T %z %Y',
    locale   => 'en_GB',
    on_error => 'croak',
);

sub id {
    my $self  = shift;

 view all matches for this distribution


App-cal-idn

 view release on metacpan or  search on metacpan

lib/App/cal/idn.pm  view on Meta::CPAN

    my $hol = list_idn_holidays(
        detail => 1, year => $y, month => $m,
        (is_joint_leave => 0) x !$args{show_joint_leave},
    )->[2];

    # XXX use locale
    if ($args{show_year_in_title} // 1) {
        push @lines, _center(21, sprintf("%s %d", $month_names->[$m-1], $y));
    } else {
        push @lines, _center(21, sprintf("%s", $month_names->[$m-1]));
    }

    push @lines, "Sn Sl Rb Km Jm Sb Mg"; # XXX use locale (but TBH locale's versions suck: Se Se Ra Ka Ju Sa Mi)

    my $dow = $dt->day_of_week;
    $dt->subtract(days => $dow-1);
    for my $i (1..$dow-1) {
        push @lines, "" if $i == 1;

 view all matches for this distribution


App-calx

 view release on metacpan or  search on metacpan

lib/App/calx.pm  view on Meta::CPAN

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-06-22'; # DATE
our $DIST = 'App-calx'; # DIST
our $VERSION = '0.009'; # VERSION

# XXX use locale
my $month_names = [qw(January February March April May June July August September October November December)];
my $short_month_names = [qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)];

our %SPEC;

lib/App/calx.pm  view on Meta::CPAN

            push @$hol, @$res;
        }
    }
    $hol = [sort {$a->{date} cmp $b->{date}} @$hol];

    # XXX use locale
    if ($args{show_year_in_title} // 1) {
        push @lines, _center(21, sprintf("%s %d", $month_names->[$m-1], $y));
    } else {
        push @lines, _center(21, sprintf("%s", $month_names->[$m-1]));
    }

    push @lines, "Mo Tu We Th Fr Sa Su"; # XXX use locale, option to start on Sunday

    my $dow = $dt->day_of_week;
    $dt->subtract(days => $dow-1);
    for my $i (1..$dow-1) {
        push @lines, "" if $i == 1;

 view all matches for this distribution


App-cdnget

 view release on metacpan or  search on metacpan

lib/App/cdnget.pm  view on Meta::CPAN


sub log_info
{
	my ($msg) = @_;
	$msg = "Unknown" unless $msg;
	my $dts = DateTime->now(time_zone => POSIX::strftime("%z", localtime), locale => "en")->strftime('%x %T %z');
	$msg = "[$dts] $msg";
	say $msg;
}

sub main

 view all matches for this distribution


App-cpan2arch

 view release on metacpan or  search on metacpan

lib/App/cpan2arch/WritePkgbuild.pm  view on Meta::CPAN

      'perl-capture-tiny>=0.50'
      'perl-chi>=0.61'
      'perl-cpanel-json-xs>=4.40'
      'perl-devel-checkbin>=0.04'
      'perl-encode'
      'perl-encode-locale>=1.05'
      'perl-io-socket-ssl>=2.098'
      'perl-list-compare>=0.55'
      'perl-module-corelist>=5.20260420'
      'perl-mojo-useragent-cached>=1.25'  # Package for Mojo::UserAgent::Cached is missing.
      'perl-mojolicious'

 view all matches for this distribution


App-cpanminus-reporter

 view release on metacpan or  search on metacpan

t/data/build.module_dir.log  view on Meta::CPAN

Checking for float.h... yes
Checking for assert.h... yes
Checking for ctype.h... yes
Checking for errno.h... yes
Checking for limits.h... yes
Checking for locale.h... yes
Checking for math.h... yes
Checking for setjmp.h... yes
Checking for signal.h... yes
Checking for stddef.h... yes
Checking for stdio.h... yes

 view all matches for this distribution


App-cpanminus

 view release on metacpan or  search on metacpan

lib/App/cpanminus/fatscript.pm  view on Meta::CPAN

  	Carp::croak("Invalid version format (non-numeric data)");
      }
  
      $value = _un_vstring($value);
  
      if ($Config{d_setlocale}) {
  	use POSIX qw/locale_h/;
  	use if $Config{d_setlocale}, 'locale';
  	my $currlocale = setlocale(LC_ALL);
  
  	# if the current locale uses commas for decimal points, we
  	# just replace commas with decimal places, rather than changing
  	# locales
  	if ( localeconv()->{decimal_point} eq ',' ) {
  	    $value =~ tr/,/./;
  	}
      }
  
      # exponential notation

 view all matches for this distribution


App-cpantimes

 view release on metacpan or  search on metacpan

bin/cpant  view on Meta::CPAN

  }
  
  package version::vpp;
  use strict;
  
  use POSIX qw/locale_h/;
  use locale;
  use vars qw ($VERSION @ISA @REGEXS);
  $VERSION = 0.88;
  
  use overload (
      '""'       => \&stringify,

bin/cpant  view on Meta::CPAN

  	    $self->{alpha} = 1 if $value->{alpha};
  	    $self->{original} = ''.$value->{original};
  	    return $self;
  	}
  
  	my $currlocale = setlocale(LC_ALL);
  
  	# if the current locale uses commas for decimal points, we
  	# just replace commas with decimal places, rather than changing
  	# locales
  	if ( localeconv()->{decimal_point} eq ',' ) {
  	    $value =~ tr/,/./;
  	}
  
  	if ( not defined $value or $value =~ /^undef$/ ) {
  	    # RT #19517 - special case for undef comparison

 view all matches for this distribution


App-dategrep

 view release on metacpan or  search on metacpan

lib/App/dategrep/Strptime.pm  view on Meta::CPAN

use v5.10.0;
use parent 'Exporter';
use Time::Local 'timelocal', 'timegm';
use Carp 'croak';
our @EXPORT_OK = qw(strptime);
use POSIX 'locale_h';
use POSIX 'strftime';
use I18N::Langinfo qw(langinfo
  ABDAY_1 ABDAY_2 ABDAY_3 ABDAY_4 ABDAY_5 ABDAY_6 ABDAY_7
  ABMON_1 ABMON_2 ABMON_3 ABMON_4 ABMON_5 ABMON_6 ABMON_7 ABMON_8 ABMON_9 ABMON_10 ABMON_11 ABMON_12
  DAY_1 DAY_2 DAY_3 DAY_4 DAY_5 DAY_6 DAY_7

lib/App/dategrep/Strptime.pm  view on Meta::CPAN


my ( %cache, %patterns, %months, %abbrevated_months, %has_year );

sub build_patterns {

    setlocale( LC_TIME, "" );

    my $i = 1;
    my %abbrevated_weekdays =
      map { langinfo($_) => $i++ } ABDAY_1, ABDAY_2, ABDAY_3, ABDAY_4, ABDAY_5,
      ABDAY_6, ABDAY_7;

 view all matches for this distribution


App-diff_spreadsheets

 view release on metacpan or  search on metacpan

t/t_TestCommon.pm  view on Meta::CPAN

# Run a Perl script in a sub-process.
#
# Provides -I options to mimic @INC (PERL5LIB is often not set)
#
# -CIOE is passed to make stdio UTF-8 regardless of the actual test
# environment, but if the script does e.g. "use open ':locale'" it will
# override that.   I'm forcing LC_ALL=C so things like date and number
# formats will be predictable for testing.
#
# This is usually enclosed in Capture::Tiny::capture { ... }
#

 view all matches for this distribution


App-dozo

 view release on metacpan or  search on metacpan

lib/App/dozo.pm  view on Meta::CPAN


=head2 Environment

=over 4

=item * Based on Ubuntu with Japanese locale (ja_JP.UTF-8)

=item * Perl and Python3 runtime environments

=item * Common API keys are automatically inherited from host
(DEEPL_AUTH_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)

 view all matches for this distribution


App-dropboxapi

 view release on metacpan or  search on metacpan

script/dropbox-api  view on Meta::CPAN


    exit(0);
}

sub du {
    my $remote_base = decode('locale_fs', slash(shift));
    $remote_base =~ s|/$||;
    my $entries = _find($remote_base);
    my $dir_map = {};
    for my $content (@{ $entries }) {
        if ($content->{'.tag'} eq 'folder') {

script/dropbox-api  view on Meta::CPAN

    }
    return @paths;
}

sub list {
    my $remote_base = decode('locale_fs', slash(shift));
    if ($remote_base eq '/') {
        $remote_base = '';
    }
    my $list = $box->list_folder($remote_base) or die $box->error;
    for my $entry (@{ $list->{entries} }) {

script/dropbox-api  view on Meta::CPAN

            $content->{path_display};
    }
}

sub find {
    my $remote_base = decode('locale_fs', slash(shift));
    if ($remote_base eq '/') {
        $remote_base = '';
    }
    $printf ||= "%p\n";
    my $entries = _find($remote_base);

script/dropbox-api  view on Meta::CPAN

        print &_line($entry);
    }
}

sub _find ($) {
    my $remote_base = decode('locale_fs', slash(shift));
    if ($remote_base eq '/') {
        $remote_base = '';
    }
    my @entries;
    my $fetch;

script/dropbox-api  view on Meta::CPAN

    [ sort { $a->{path_lower} cmp $b->{path_lower} } @entries ];
}

sub copy {
    my ($src, $dst) = @_;
    my $res = $box->copy(decode('locale_fs', slash($src)), decode('locale_fs', slash($dst))) or die $box->error;
    print pretty($res) if $verbose;
}

sub move {
    my ($src, $dst) = @_;
    my $res = $box->move(decode('locale_fs', slash($src)), decode('locale_fs', slash($dst))) or die $box->error;
    print pretty($res) if $verbose;
}

sub mkdir {
    my ($dir) = @_;
    my $res = $box->create_folder(decode('locale_fs', slash($dir))) or die $box->error;
    print pretty($res) if $verbose;
}

sub delete {
    my ($file_or_dir) = @_;
    my $res = $box->delete(decode('locale_fs', slash($file_or_dir))) or die $box->error;
    print pretty($res) if $verbose;
}

sub upload {
    my ($file, $path) = @_;

script/dropbox-api  view on Meta::CPAN

        or die "Usage: \n    dropbox-api upload /tmp/local.txt dropbox:/Public/some.txt";
    my $local_path = file($file);
    if ((! length $path) or $path =~ m|/$|) {
        $path.= basename($file);
    }
    my $res = &put($local_path, decode('locale_fs', $path)) or die $box->error;

    if ($verbose) {
        print pretty($res);
    }

script/dropbox-api  view on Meta::CPAN

sub download {
    my ($path, $file) = @_;
    $path =~ s|^dropbox:/|/|
        or die "Usage: \n    dropbox-api download dropbox:/Public/some.txt /tmp/local.txt";
    my $fh = file($file)->openw or die $!;
    $box->download(decode('locale_fs', $path), $fh) or die $box->error;
    $fh->close;
}

sub sync {
    my ($arg1, $arg2) = @_;

script/dropbox-api  view on Meta::CPAN


    # download
    if ($arg1 =~ qr{ \A dropbox: }xms and $arg2 !~ qr{ \A dropbox: }xms) {

        my ($remote_base, $local_base) = ($arg1, $arg2);
        $remote_base = decode('locale_fs', $remote_base);
        $remote_base =~ s|^dropbox:||;

        if ($remote_base eq '/' || $remote_base eq '') {
            unless (-d $local_base) {
                die "missing $local_base";

script/dropbox-api  view on Meta::CPAN


    # upload
    elsif ($arg1 !~ qr{ \A dropbox: }xms and $arg2 =~ qr{ \A dropbox: }xms) {

        my ($local_base, $remote_base) = ($arg1, $arg2);
        $remote_base = decode('locale_fs', $remote_base);
        $remote_base =~ s|^dropbox:||;

        if (-d $local_base) {
            &sync_upload($remote_base, dir(abs_path($local_base)));
        } elsif (-f $local_base) {

script/dropbox-api  view on Meta::CPAN

                next;
            } else {
                $rel_path = $content->{name};
            }
        }
        my $rel_path_enc = encode('locale_fs', $rel_path);
        $remote_map->{$rel_path}++;
        printf "check: %s\n", $rel_path if $debug;
        my $is_dir = $content->{'.tag'} eq 'folder' ? 1 : 0;
        my $local_path = $is_dir ? dir($local_base, $rel_path_enc) : file($local_base, $rel_path_enc);
        if ($is_dir) {
            printf "remote: %s\n", $remote_path if $debug;
            printf "local:  %s\n", $local_path if $debug;
            if (!-d $local_path) {
                $local_path->mkpath unless $dry;
                printf "mkpath %s\n", decode('locale_fs', $local_path);
            } else {
                printf "skip %s\n", $rel_path if $verbose;
            }
        } else {

            if ((!-f $local_path) || has_change($local_path, $content)) {

                if ($dry) {
                    printf "download %s\n", decode('locale_fs', $local_path);
                    next;
                }

                # not displayed in the dry-run for the insurance
                unless (-d $local_path->dir) {
                    printf "mkpath %s\n", decode('locale_fs', $local_path->dir);
                    $local_path->dir->mkpath;
                }

                my $local_path_tmp = $local_path . '.dropbox-api.tmp';
                my $fh;
                unless (open($fh, '>', $local_path_tmp)) {
                    warn "open failure " . decode('locale_fs', $local_path) . " (" . $! . ")";
                    $exit_code = 1;
                    next;
                }
                if ($box->download($content->{path_display}, $fh)) {
                    printf "download %s\n", decode('locale_fs', $local_path);
                    close($fh);
                    my $remote_epoch = $strpz->parse_datetime($content->{client_modified})->epoch;
                    unless (utime($remote_epoch, $remote_epoch, $local_path_tmp)) {
                        warn "set modification time failure " .  decode('locale_fs', $local_path);
                        $exit_code = 1;
                    }
                    unless (rename($local_path_tmp, $local_path)) {
                        unlink($local_path_tmp);
                        warn "rename failure " . decode('locale_fs', $local_path_tmp);
                        $exit_code = 1;
                    }
                } else {
                    unlink($local_path_tmp);
                    chomp( my $error = $box->error );
                    warn "download failure " . decode('locale_fs', $local_path) . " (" . $error . ")";
                    $exit_code = 1;
                }
            } else {
                printf "skip %s\n", $rel_path if $verbose;
            }

script/dropbox-api  view on Meta::CPAN

            if ($local_path eq $local_base) {
                return;
            }

            my $rel_path_enc = abs2rel($local_path, $local_base);
            my $rel_path = decode('locale_fs', $rel_path_enc);

            if (exists $remote_map->{$rel_path}) {
                if ($verbose) {
                    printf "skip %s\n", $rel_path;
                }

script/dropbox-api  view on Meta::CPAN

    }

    if ((!-f $local_path) || has_change($local_path, $content)) {

        if ($dry) {
            printf "download %s\n", decode('locale_fs', $local_path);
            return;
        }

        unless (-d $local_path->dir) {
            printf "mkpath %s\n", decode('locale_fs', $local_path->dir);
            $local_path->dir->mkpath;
        }

        my $local_path_tmp = $local_path . '.dropbox-api.tmp';
        my $fh;
        unless (open($fh, '>', $local_path_tmp)) {
            warn "open failure " . decode('locale_fs', $local_path) . " (" . $! . ")";
            $exit_code = 1;
            return;
        }
        if ($box->download($content->{path_display}, $fh)) {
            printf "download %s\n", decode('locale_fs', $local_path);
            close($fh);
            my $remote_epoch = $strpz->parse_datetime($content->{client_modified})->epoch;
            unless (utime($remote_epoch, $remote_epoch, $local_path_tmp)) {
                warn "set modification time failure " .  decode('locale_fs', $local_path);
                $exit_code = 1;
            }
            unless (rename($local_path_tmp, $local_path)) {
                unlink($local_path_tmp);
                warn "rename failure " . decode('locale_fs', $local_path_tmp);
                $exit_code = 1;
            }
        } else {
            unlink($local_path_tmp);
            chomp( my $error = $box->error );
            warn "download failure " . decode('locale_fs', $local_path) . " (" . $error . ")";
            $exit_code = 1;
        }
    } else {
        printf "skip %s\n", $content->{path_display} if $verbose;
    }

script/dropbox-api  view on Meta::CPAN

        callback => sub {
            my $local_path = shift;
            if ($local_path eq $local_base) {
                return;
            }
            my $rel_path = decode('locale_fs', abs2rel($local_path, $local_base));
            my $remote_path = file($remote_base, $rel_path);
            my $content = delete $remote_map->{ lc $rel_path };

            # exists file or directory
            if ($content) {

script/dropbox-api  view on Meta::CPAN

    my $remote_size = $content->{size};
    my $local_size = $local_path->stat->size;

    if ($debug) {
        printf "remote: %10s %10s %s\n", $remote_epoch, $remote_size, $content->{path_display};
        printf "local:  %10s %10s %s\n", $local_epoch, $local_size, decode('locale_fs', $local_path);
    }

    if (($remote_size != $local_size) || ($remote_epoch != $local_epoch)) {
        return 1;
    }

 view all matches for this distribution


App-findeps

 view release on metacpan or  search on metacpan

lib/App/findeps.pm  view on Meta::CPAN

# subroutines #----#----#----#----#----#----#----#----#----#----#----#----#
my @pragmas = qw(
    attributes autodie autouse
    base bigint bignum bigrat blib bytes
    charnames constant diagnostics encoding
    feature fields filetest if integer less lib locale mro
    open ops overload overloading parent re
    sigtrap sort strict subs
    threads threads::shared utf8 vars vmsish
    warnings warnings::register
);

 view all matches for this distribution


( run in 2.470 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )