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


Data-Context

 view release on metacpan or  search on metacpan

t/perlcriticrc  view on Meta::CPAN

# max_characters = 60


# Use named character classes instead of explicit character lists.
[RegularExpressions::ProhibitEnumeratedClasses]
# set_themes                         = core cosmetic pbp unicode
# add_themes                         =
# severity                           = 1
# maximum_violations_per_document    = no_limit


 view all matches for this distribution


Data-Crumbr

 view release on metacpan or  search on metacpan

bin/crumbr  view on Meta::CPAN

   return $reader->($config, $filename);
} ## end sub read_data

sub read_data_yaml {
   my ($config, $filename) = @_;
   my $unicode_string = slurp($filename, $config{encoding});

   for my $class (qw< YAML::XS YAML YAML::Tiny >) {
      eval "use $class";
      next if $EVAL_ERROR;
      my $function = $class->can('Load');
      return $function->($unicode_string);
   } ## end for my $class (qw< YAML::XS YAML YAML::Tiny >)
   die "cannot find any YAML module\n";
   return;
} ## end sub read_data_yaml

sub read_data_json {
   my ($config, $filename) = @_;
   my $unicode_string = slurp($filename, $config{encoding});

   require Encode;
   my $utf8_octets =
     Encode::encode('UTF-8', $unicode_string, Encode::FB_CROAK());

   my @cs = qw< Cpanel::JSON::XS JSON::XS Mojo::JSON JSON::PP >;
   for my $class (@cs) {
      eval "use $class";
      next if $EVAL_ERROR;

 view all matches for this distribution


Data-Decode

 view release on metacpan or  search on metacpan

lib/Data/Decode.pm  view on Meta::CPAN

Data::Decode implements a pluggable "decoder". The main aim is to provide
a uniform interface to decode a given data while allowing the actual
algorithm being used to be changed depending on your needs..

For now this is aimed at decoding miscellaneous text to perl's internal 
unicode encoding.

=head1 DECODING TO UNICODE

Japanese, which is the language that I mainly deal with, has an annoying
property, in that it can come in at least 4 different flavors (utf-8,
shift-jis, euc-jp and iso-2022-jp).
Even worse, vendors may have more vendor-specific symbols, such as the
pictograms in mobile phones.

Ways to decode these strings into unicode varies between each environment 
and application.

Many modules require that the strings be normalized to unicode, but they
all handle this normalization process differently, which is, well, not exactly
an optimal solution.

Data::Decode provides a uniform interface to this problem, and a few common
ways decoding is handled. The actual decoding strategies are separated out

 view all matches for this distribution


Data-Denter

 view release on metacpan or  search on metacpan

Denter.pod  view on Meta::CPAN

readability and completeness. YAML's number one design goal is human
readability.

Another large benefit of YAML is that it is a programming language
independent serialization language. Implementations currently exist for
Perl, Python, Ruby and Java. In addition, YAML is unicode based, has
extensible typing and allows stream based processing.

C<Data::Denter> has served its purpose and is now being fully deprecated
in favor of C<YAML.pm>. I have made C<YAML.pm> a module prerequisite for
C<Data::Denter>, so if you used the CPAN shell to install

 view all matches for this distribution


Data-Dmp

 view release on metacpan or  search on metacpan

lib/Data/Dmp.pm  view on Meta::CPAN

Bool, default: 0.

If set to 1, then pragmas at the start of coderef dump will be removed. Coderef
dump is produced by L<B::Deparse> and is of the form like:

 sub { use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; $a <=> $b }

If you want to dump short coderefs, the pragmas might be distracting. You can
turn turn on this option which will make the above dump become:

 sub { $a <=> $b }

 view all matches for this distribution


Data-Dump-HTML-Collapsible

 view release on metacpan or  search on metacpan

lib/Data/Dump/HTML/Collapsible.pm  view on Meta::CPAN

Bool, default: 0.

If set to 1, then pragmas at the start of coderef dump will be removed. Coderef
dump is produced by L<B::Deparse> and is of the form like:

 sub { use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; $a <=> $b }

If you want to dump short coderefs, the pragmas might be distracting. You can
turn turn on this option which will make the above dump become:

 sub { $a <=> $b }

 view all matches for this distribution


Data-Dump-HTML-PopUp

 view release on metacpan or  search on metacpan

lib/Data/Dump/HTML/PopUp.pm  view on Meta::CPAN

Bool, default: 0.

If set to 1, then pragmas at the start of coderef dump will be removed. Coderef
dump is produced by L<B::Deparse> and is of the form like:

 sub { use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; $a <=> $b }

If you want to dump short coderefs, the pragmas might be distracting. You can
turn turn on this option which will make the above dump become:

 sub { $a <=> $b }

 view all matches for this distribution


Data-Dump-PHP

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

t/00-compile.t
t/dd.t
t/dump.t
t/eval.t
t/glob.t
t/quote-unicode.t
t/quote.t
t/ref-php.t
t/ref.t
t/regexp.t
t/release-pod-coverage.t

 view all matches for this distribution


Data-Dump-Perl6

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

t/dd.t
t/dollar-one.t
t/dump.t
t/glob.t
t/hash.t
t/quote-unicode.t
t/quote.t
t/ref.t
t/regexp.t
t/scalar-obj.t
t/scalar.t

 view all matches for this distribution


Data-Dump-Ruby

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

lib/Data/Dump/Ruby.pm
lib/Data/Dump/Ruby/Trace.pm
t/00-compile.t
t/dd.t
t/dump.t
t/quote-unicode.t
t/quote.t
t/ref-ruby.t
t/regexp.t
t/release-pod-coverage.t
t/release-pod-syntax.t

 view all matches for this distribution


Data-Dump-SortKeys

 view release on metacpan or  search on metacpan

lib/Data/Dump/SortKeys.pm  view on Meta::CPAN

=item $Data::Dump::SortKeys::REMOVE_PRAGMAS

If set to 1, then pragmas at the start of coderef dump will be removed. Coderef
dump is produced by L<B::Deparse> and is of the form like:

 sub { use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; $a <=> $b }

If you want to dump short coderefs, the pragmas might be distracting. You can
turn turn on this option which will make the above dump become:

 sub { $a <=> $b }

 view all matches for this distribution


Data-Dump-Streamer

 view release on metacpan or  search on metacpan

lib/Data/Dump/ppport.h  view on Meta::CPAN

pad_sv||5.011000|
pad_swipe|||
pad_tidy|||
pad_undef|||
parse_body|||
parse_unicode_opts|||
parser_dup|||
parser_free|||
path_is_absolute|||n
peep|||
pending_Slabs_to_ro|||

lib/Data/Dump/ppport.h  view on Meta::CPAN

#ifndef PERL_PV_PRETTY_REGPROP
#  define PERL_PV_PRETTY_REGPROP         PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif

/* Hint: pv_escape
 * Note that unicode functionality is only backported to
 * those perl versions that support it. For older perl
 * versions, the implementation will fall back to bytes.
 */

#ifndef pv_escape

 view all matches for this distribution


Data-Dump

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

t/dump.t
t/eval.t
t/filtered.t
t/glob.t
t/hash.t
t/quote-unicode.t
t/quote.t
t/ref.t
t/regexp.t
t/scalar-obj.t
t/scalar.t

 view all matches for this distribution


Data-Dumper-AutoEncode

 view release on metacpan or  search on metacpan

lib/Data/Dumper/AutoEncode.pm  view on Meta::CPAN


    eDumper(+{ foo => 'おでん' })

=head1 DESCRIPTION

Data::Dumper::AutoEncode stringifies perl data structures including unicode string to human-readable.

example:

    use utf8;
    use Data::Dumper;

 view all matches for this distribution


Data-Dumper-Interp

 view release on metacpan or  search on metacpan

lib/Data/Dumper/Interp.pm  view on Meta::CPAN

#use 5.011; # cpantester gets warning that 5.11 is the minimum acceptable
#use 5.014; # /r for non-destructive substitution
use 5.018;  # lexical_subs
use feature qw(say state lexical_subs current_sub);
use feature 'lexical_subs';
use feature 'unicode_strings';



package
  # newline so Dist::Zilla::Plugin::PkgVersion won't add $VERSION

lib/Data/Dumper/Interp.pm  view on Meta::CPAN

  $Foldwidth1     = undef        unless defined $Foldwidth1; # override for 1st

  # The following override Data::Dumper defaults
  # Initial D::D values are captured once when we are first loaded.

  #$Useqq          = "<unicode:controlpic>" unless defined $Useqq;
  $Useqq          = "<unicode>"    unless defined $Useqq;
  $Quotekeys      = 0            unless defined $Quotekeys;
  $Sortkeys       = \&__sortkeys unless defined $Sortkeys;
  $Maxdepth       = $Data::Dumper::Maxdepth   unless defined $Maxdepth;
  $Maxrecurse     = $Data::Dumper::Maxrecurse unless defined $Maxrecurse;
  $Deparse        = 0            unless defined $Deparse;

lib/Data/Dumper/Interp.pm  view on Meta::CPAN

    #$code .= " { \@_ = ( &__getself->_EnabUseqqFeature(':showspaces')" ;
  }
  else { oops "basename=",u($basename) }

  my $useqq = "";
  $useqq .= ":unicode:controlpics" if delete $mod{c};
  $useqq .= ":condense"            if delete $mod{C};
  $code .= '->Debug(2)'            if delete $mod{D};
  $useqq .= ":hex"                 if delete $mod{h};
  $code .= '->Objects(0)'          if delete $mod{o};
  $useqq .= ":octets"              if delete $mod{O};

lib/Data/Dumper/Interp.pm  view on Meta::CPAN

             $_ }/xegs;

  s/\Q${\_MAGIC_KEEPQUOTES_PFX}\E//gs;
}

sub __unesc_unicode() {  # edits $_
  if (/^"/) {
    # Data::Dumper with Useqq(1) outputs wide characters as hex escapes;
    # turn them back into the original characters if "printable".
    # That means "Graph" category EXCEPT:
    #   BOM (which is ZERO WIDTH NO-BREAK SPACE so is considered "Graphical")

lib/Data/Dumper/Interp.pm  view on Meta::CPAN

  my $useqq = $self->Useqq();

  carp "WARNING: The Useqq specification string ",_dbvis($useqq)," contains a non-ASCII character but 'use utf8;' was not in effect when the literal was compiled; the intended chracter was probably not used.\n"
    if $useqq =~ /[^\x{0}-\x{7F}]/ && !utf8::is_utf8($useqq);

  my ($unesc_unicode,$condense_strings,$octet_strings,$nums_in_hex,
      $controlpics,$showspaces,$underscores,$q_pfx,$q_lq,$q_rq);
  if ($useqq && $useqq ne "1") {
    my @useqq = split /(?<!\\):/, $useqq;
    foreach (@useqq) {
      $unesc_unicode    = 1,next if /utf|unic/;
      $condense_strings = 1,next if /cond/;
      $octet_strings    = 1,next if /octet/;
      $nums_in_hex      = 1,next if /hex/;
      $controlpics      = 1,next if /pic/;
      $showspaces        = 1,next if /space/;

lib/Data/Dumper/Interp.pm  view on Meta::CPAN

  $indent_unit = 2; # make configurable?

  my $maxlinelen = $foldwidth1 || $foldwidth || INT_MAX;
  my $maxlineNlen = ($foldwidth // INT_MAX) - length($pad);

  if ($unesc_unicode && _utfoutput()) {
    # Probably it's safe to use wide characters
    $COND_LB = "\N{LEFT DOUBLE PARENTHESIS}";
    $COND_RB = "\N{RIGHT DOUBLE PARENTHESIS}";
    $COND_MULT = "\N{MULTIPLICATION SIGN}";
    $LQ = "«";

lib/Data/Dumper/Interp.pm  view on Meta::CPAN

  my sub atom($;$) {
    (local $_, my $mode) = @_;
    $mode //= "";

    __unmagic_atom ;
    __unesc_unicode          if $unesc_unicode;
    __unesc_nonoctal         if $octet_strings;
    __subst_controlpic_backesc      if $controlpics;
    __subst_visiblespaces    if $showspaces;
    __condense_strings(8)    if $condense_strings;
    __change_quotechars($q_pfx, $q_lq, $q_rq) if defined($q_pfx);

lib/Data/Dumper/Interp.pm  view on Meta::CPAN


1 means generate "double quoted" strings as-is from Data::Dumper.
Non-ASCII charcters will likely appeqar as hex or octal escapes.

Otherwise generate "double quoted" strings enhanced according to option
keywords given as a :-separated list, e.g. Useqq("unicode:controlpics").
The avilable options are:

=over 4

=item "unicode"

Printable ("graphic")
characters are shown as themselves rather than hex escapes, and
'\n', '\t', etc. are shown for ASCII control codes.

lib/Data/Dumper/Interp.pm  view on Meta::CPAN

similarly ␀ ␇ ␈ ␛ ␌ ␍ ␉ for \0 \a \b \e \f \r \t.

Every character occupies the same space with a fixed-width font, but
the tiny "control picures" can be hard to read;
to see traditional \n etc.  while still seeing wide characters as themselves,
set C<Useqq> to just "unicode";

=item "octets"

Optimize for viewing binary strings (i.e. strings of octets, not "wide"
characters).  Octal escapes are shown instead of \n, \r, etc.

lib/Data/Dumper/Interp.pm  view on Meta::CPAN


  vec(my $s, 31, 1) = 1;
  my $str = unpack "b*", $s;
  say $str;
    -->00000000000000000000000000000001
  say visnew->Useqq("unicode:condense")->visl($str);
    -->⸨0×31⸩1

=item "underscores"

Show numbers with '_' seprating groups of 3 digits.

lib/Data/Dumper/Interp.pm  view on Meta::CPAN


(Deprecated) Equivalent to "style=qq{,}"

=back

The default is C<Useqq('unicode')> except for C<dvis> which also
enables 'condense' and possibly 'showspaces'.
Functions/methods with 'q' in their name force C<Useqq(0)>;

=head2 Quotekeys

 view all matches for this distribution


Data-Dumper-Limited

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

pad_sv||5.011000|
pad_swipe|||
pad_tidy|||
pad_undef|||
parse_body|||
parse_unicode_opts|||
parser_dup|||
parser_free|||
path_is_absolute|||n
peep|||
pending_Slabs_to_ro|||

ppport.h  view on Meta::CPAN

#ifndef PERL_PV_PRETTY_REGPROP
#  define PERL_PV_PRETTY_REGPROP         PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif

/* Hint: pv_escape
 * Note that unicode functionality is only backported to
 * those perl versions that support it. For older perl
 * versions, the implementation will fall back to bytes.
 */

#ifndef pv_escape

 view all matches for this distribution


Data-Dumper

 view release on metacpan or  search on metacpan

Dumper.pm  view on Meta::CPAN

    if ($high eq "iso8859") {   # Doesn't escape the Latin1 printables
      if ($IS_ASCII) {
        s/([\200-\240])/'\\'.sprintf('%o',ord($1))/eg;
      }
      else {
        my $high_control = utf8::unicode_to_native(0x9F);
        s/$high_control/sprintf('\\%o',ord($1))/eg;
      }
    } elsif ($high eq "utf8") {
#     Some discussion of what to do here is in
#       https://rt.perl.org/Ticket/Display.html?id=113088

 view all matches for this distribution


Data-Edit-Xml-Lint

 view release on metacpan or  search on metacpan

lib/Data/Edit/Xml/Lint.pm  view on Meta::CPAN

# Separate reference fixup into a separate framework (like Dita::Conversion)
# Show number of compressed errors on Lint summary line
# Highlight error counts in bold using boldText() or perhaps enclosed alphanumerics
# Relint load data in parallel
# option to print xmllint command
# inputFile=>name unicode seems to be failing
# Lots more tests needed

package Data::Edit::Xml::Lint;
our $VERSION = 20200108;
use warnings FATAL => qw(all);

 view all matches for this distribution


Data-Edit-Xml-To-Dita

 view release on metacpan or  search on metacpan

lib/Data/Edit/Xml/To/DitaVb.pm  view on Meta::CPAN

sub publish          {0}                                                        # 1 - convert Dita to Html and publish via DITA-OT if at 100% lint,  2 - publish regardless
sub restructure      {0}                                                        # 1 - Restructure results of conversion if at 100% lint, 2 - restructure regardless of error count.
sub restructurePhases{1}                                                        # Number of restructuring phases to run
sub testMode         {&develop ? 1 : 0}                                         # 1 - run development tests, 2- run standalone tests, 0 run production documents
sub titleOnly        {0}                                                        # Use only the title of topics to create GB Standard file names otherwise use the following text as well if the title is too short
sub unicode          {download}                                                 # Convert to utf8 if true.
sub upload           {&develop ? 0 : 1}                                         # Upload to S3 Bucket if true and the conversion is at 100%, 2 - upload to S3 Bucket regardless, 0 - no upload to S3 Bucket.
sub version          {q()}                                                      # Description of this run as printed in notification message and title
sub xref             {1}                                                        # Xref output xml.
sub xrefAddNavTitles {1}                                                        # Add navtitles to bookmap entries if true
sub xrefAllowUniquePartialMatches{1}                                            # Allow partial matching - i.e ignore the stuff to the right of the # in a reference if doing so produces a unique result

lib/Data/Edit/Xml/To/DitaVb.pm  view on Meta::CPAN


  $source;
 }

sub convertToUTF8                                                               #P Convert the encoding of documents in L<downloads|/downloads> to utf8 equivalents in folder L<in|/in>.
 {if (unicode)
   {clearFolder(in, clearCount);

    my @d = searchDirectoryTreesForMatchingFiles(downloads, inputExt);          # Files downloaded
    my $n = @d;
    confess "No documents to convert" unless $n;                                # Stop right here if there is nothing to convert

lib/Data/Edit/Xml/To/DitaVb.pm  view on Meta::CPAN

     {my $t = formatTableBasic([[qw(File)], map {[$_]} @failed]);
      eee "The following source files failed to convert:\n", $t;
     }
    else
     {lll "Unicode conversion - converted all $n documents";
      Flip::Flop::unicode();
     }
   }
  else
   {ddd "Unicode conversion not requested";
   }
 }

sub convertToUTF822                                                             #P Convert the encoding of documents in L<downloads|/downloads> to utf8 equivalents in folder L<in|/in>.
 {if (unicode)
   {clearFolder(in, clearCount);

    my @d = searchDirectoryTreesForMatchingFiles(downloads, inputExt);          # Files downloaded
    my $n = @d;
    confess "No documents to convert" unless $n;                                # Stop right here if there is nothing to convert

lib/Data/Edit/Xml/To/DitaVb.pm  view on Meta::CPAN

       {my $t = formatTableBasic([[qw(File)], map {[$_]} @failed]);
        eee "The following source files failed to convert:\n", $t;
       }
      else
       {lll "Unicode conversion - converted all $n documents";
        Flip::Flop::unicode();
       }
     }
   }
  else
   {ddd "Unicode conversion not requested";

lib/Data/Edit/Xml/To/DitaVb.pm  view on Meta::CPAN

testResults
testStandAlone
tests
titleOnly
topicTrees
unicode
upload
user
version
www
xref

lib/Data/Edit/Xml/To/DitaVb.pm  view on Meta::CPAN

default value supplied for this attribute by this package.

=head2 Replaceable Attribute List


catalog clearCount client conversion convert debug deguidize develop ditaBin ditaXrefs docSet download downloads endTime errorLogFile exchange exchangeHome exchangeItems extendedNames fails fixBadRefs fixDitaRefs fixFailingFiles fixXrefsByTitle gathe...


=head2 catalog

Dita catalog to be used for linting.

lib/Data/Edit/Xml/To/DitaVb.pm  view on Meta::CPAN

=head2 topicTrees

Folder to contain printed topic trees if requested by printTopicTrees


=head2 unicode

Convert to utf8 if true.


=head2 upload

 view all matches for this distribution


Data-FormValidator

 view release on metacpan or  search on metacpan

t/FV_length.t  view on Meta::CPAN


# Test "long" results. Early implementations checked length with
# regular expressions which limit length options to 32kb.
# The 80000 char test string is an arbitrary length.
# good a value as any other. And it's pretty long.
# Just for good measure we'll use the unicode smiley character (as seen in
# perluniintro) in our test string.

my $smiley      = "\x{263a}";            # Thats "smiling face, white" folks!
my $long_string = "x$smiley" x 40000;    # results in a 80000 length string
my $long_result = Data::FormValidator->check( {

 view all matches for this distribution


Data-Hexify

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

t/01basic.t
t/02more.t
t/03align.t
t/04show.t
t/05chunk.t
t/06unicode.t
t/07dups.t
t/08group.t
lib/Data/Hexify.pm
META.yml                                 Module meta-data (added by MakeMaker)

 view all matches for this distribution


Data-IconText

 view release on metacpan or  search on metacpan

lib/Data/IconText.pm  view on Meta::CPAN

use Carp;
use Scalar::Util qw(looks_like_number weaken);
use Data::Identifier v0.12;

use constant {
    WK_UNICODE_CP               => Data::Identifier->new(uuid => '5f167223-cc9c-4b2f-9928-9fe1b253b560')->register, # unicode-code-point
    WK_ASCII_CP                 => Data::Identifier->new(uuid => 'f4b073ff-0b53-4034-b4e4-4affe5caf72c')->register, # ascii-code-point
    WK_FREEDESKTOP_ICON_NAME    => Data::Identifier->new(uuid => '560906df-ebd1-41f6-b510-038b30522051')->register, # freedesktop-icon-name
};

use overload '""' => sub {$_[0]->as_string};

lib/Data/IconText.pm  view on Meta::CPAN

    store       => 'File::FStore',
);

my %_for_version = (
    v0.01 => {
        default_unicode => 0x2370, # U+2370 APL FUNCTIONAL SYMBOL QUAD QUESTION
        media_type => {
            text  => 0x270D,
            audio => 0x266B,
            video => 0x2707,
            image => 0x1F5BB,

lib/Data/IconText.pm  view on Meta::CPAN

    my ($pkg, %opts) = @_;
    my $self = bless {for_version => (delete($opts{for_version}) // $VERSION)}, $pkg;
    my $for_version_info = $self->_find_for_version_info;
    my @mimetypes;

    if (defined(my $unicode = delete $opts{unicode})) {
        if (looks_like_number($unicode)) {
            $self->{unicode} //= int($unicode);
        } elsif ($unicode =~ /^U\+([0-9a-fA-F]{4,7})$/) {
            $self->{unicode} //= hex($1);
        } elsif (scalar(eval {$unicode->isa('Data::Identifier')}) && $unicode->type->eq(WK_UNICODE_CP) && $unicode->id =~ /^U\+([0-9a-fA-F]{4,7})$/) { # XXX: Experimental!
            $self->{unicode} //= hex($1);
        } else {
            croak 'Passed unicode value is in wrong format';
        }
    }

    if (defined(my $raw = delete $opts{raw})) {
        croak 'Raw has wrong length' unless length($raw) == 1;
        $self->{unicode} //= ord($raw);
    }

    if (defined(my $from = delete $opts{from})) {
        my $type;
        my $id;

lib/Data/IconText.pm  view on Meta::CPAN


        $type = $from->type;
        $id   = $from->id // croak 'Bad identifier';

        if ($type->eq(WK_UNICODE_CP) && $id =~ /^U\+([0-9a-fA-F]{4,7})$/) {
            $self->{unicode} //= hex($1);
        } elsif ($type->eq(WK_ASCII_CP) && int($id) >= 0 && int($id) <= 127) {
            $self->{unicode} //= int($id);
        }
    }

    if (defined(my $for = delete $opts{for})) {
        state $running = undef;

lib/Data/IconText.pm  view on Meta::CPAN

            unless (ref $for) {
                $for = Data::Identifier->new(from => $for);
            }

            if (defined(my $table = $for_version_info->{identifier}{$for->type->uuid})) {
                $self->{unicode} //= $table->{$for->id};
            }

            if (!defined($self->{unicode}) && $for->type->eq(WK_FREEDESKTOP_ICON_NAME)) {
                if ($for->id =~ /^flag-([a-z]{2})$/) {
                    $opts{flag} //= $1;
                }
            }

            unless (defined $self->{unicode}) {
                state $sid_forceloaded;

                if (!$sid_forceloaded && defined(my $sid = $for->sid(default => undef))) {
                    unless (defined($for->uuid(default => undef))) {
                        require Data::Identifier::Wellknown;

lib/Data/IconText.pm  view on Meta::CPAN

                }

                foreach my $type (keys %_idtype_to_uuid) {
                    my $v = $for->as($type, default => undef) // next;
                    if (defined(my $table = $for_version_info->{identifier}{$_idtype_to_uuid{$type}})) {
                        $self->{unicode} //= $table->{$v};
                    }
                    last if defined $self->{unicode};
                }
            }

            $running = 1;
            eval {

lib/Data/IconText.pm  view on Meta::CPAN

                    }
                } elsif ($for->isa('Data::TagDB::Tag')) {
                    require Encode;

                    my $icontext = $for->icontext(default => undef);
                    $self->{unicode} //= ord(Encode::decode('UTF-8' => $icontext)) if defined $icontext;
                } elsif ($for->isa('Data::URIID::Result')) {
                    my $icontext = $for->attribute('icon_text', default => undef);
                    $self->{unicode} //= ord($icontext) if defined $icontext;
                } elsif ($for->isa('Data::Identifier')) {
                    # no-op, handled above.
                } else {
                    croak 'Invalid object passed for "for"';
                }

lib/Data/IconText.pm  view on Meta::CPAN

        }
    }

    if (defined(my $flag = delete $opts{flag})) {
        if ($flag =~ /^[a-zA-Z]{2}$/) {
            $self->{unicode} = [map {0x1F1E6 - 0x61 + ord} split //, lc $flag];
        #} elsif ($flag =~ /^[a-zA-Z]+$/) {
            #$self->{unicode} = [0x1F3F4, (map {0xE0061 - 0x61 + ord} split //, lc $flag), 0xE007F];
            #warn join(' ', map {sprintf('U+%04X', $_)} @{$self->{unicode}});
        } else {
            croak 'Invalid format for flag';
        }
    }

lib/Data/IconText.pm  view on Meta::CPAN

        push(@mimetypes, $v)      if defined($v = delete($opts{mimetype}));

        foreach my $mimetype (@mimetypes) {
            $mimetype = lc($mimetype);

            $self->{unicode} //= $for_version_info->{media_subtype}{$mimetype};
            $self->{unicode} //= $for_version_info->{media_type}{$1} if $mimetype =~ m#^([a-z]+)/#;

            last if defined $self->{unicode};
        }
    }

    if (defined(my $special = delete $opts{special})) {
        $self->{unicode} //= $for_version_info->{special}{$special =~ s/-/_/gr};
    }

    if (delete $opts{no_defaults}) {
        return undef unless defined $self->{unicode};
    } else {
        $self->{unicode} //= $for_version_info->{default_unicode};
    }

    # Attach subobjects:
    $self->attach(map {$_ => delete $opts{$_}} keys(%_types), 'weak');

lib/Data/IconText.pm  view on Meta::CPAN


    return $self;
}


sub unicode {
    my ($self, @args) = @_;

    croak 'Stray options passed' if scalar @args;
    croak 'Bad object' if ref $self->{unicode};

    return $self->{unicode};
}


sub as_string {
    my ($self, @args) = @_;
    my $unicode = $self->{unicode};

    croak 'Stray options passed' if scalar @args;

    if (ref $unicode) {
        return join '' => map{chr} @{$unicode};
    } else {
        return chr($unicode);
    }
}


sub for_version {

lib/Data/IconText.pm  view on Meta::CPAN


sub as {
    my ($self, $as, %opts) = @_;

    require Data::Identifier::Generate;
    $self->{identifier} //= Data::Identifier::Generate->unicode_character(unicode => $self->unicode);

    $opts{$_} //= $self->{$_} foreach keys %_types;

    return $self->{identifier}->as($as, %opts);
}

lib/Data/IconText.pm  view on Meta::CPAN


=head1 METHODS

=head2 new

    my Data::IconText $icontext = Data::IconText->new(unicode => 0x1F981);
    # or:
    my Data::IconText $icontext = Data::IconText->new(raw => 'X');

Creates a new icon text object.

The icon text is tried to calculate from the options in the following order (first one wins):
C<unicode>, C<raw>, C<from>, C<for>, C<flag>, C<mediasubtype>, C<mediatype>, C<mimetype>, C<special>.
If none is found a fallback is used.

The following options are supported.

=over

=item C<unicode>

The unicode value (e.g. C<0x1F981>). May also be a string in standard format (e.g. C<'U+1F981'>).

=item C<raw>

The character as a raw perl string. Must be exactly one character long.

=item C<from>

Another object that represents the character.
If the object passed is not a L<Data::Identifier> it is passed via L<Data::Identifier/new> with C<from>.

Currently only identifiers of type unicode code point or ascii code point are supported.

See also:
L<Data::Identifier::Generate/unicode_character>.

=item C<flag>

A flag for a two letter country code (ISO 3166-1 alpha-2 codes).

lib/Data/IconText.pm  view on Meta::CPAN

Marks the value for all subobjects as weak.
If only a specific one needs needs to be weaken use L</attach>.

=back

=head2 unicode

    my $unicode = $icontext->unicode;

This returns the numeric unicode value (e.g. 0x1F981) of the icon text.
If there is no single value associated with the icon text, this method C<die>s.

=head2 as_string

    my $str = $icontext->as_string;

 view all matches for this distribution


Data-Identifier

 view release on metacpan or  search on metacpan

lib/Data/Identifier.pm  view on Meta::CPAN

    WK_GTIN => '82d529be-0f00-4b4f-a43f-4a22de5f5312', # gtin
    WK_IBAN => 'b1418262-6bc9-459c-b4b0-a054d77db0ea', # iban
    WK_BIC  => 'c8a3a132-f160-473c-b5f3-26a748f37e62', # bic
    WK_DOI  => '931f155e-5a24-499b-9fbb-ed4efefe27fe', # doi
    WK_FC   => 'd576b9d1-47d4-43ae-b7ec-bbea1fe009ba', # factgrid-identifier
    WK_UNICODE_CP => '5f167223-cc9c-4b2f-9928-9fe1b253b560', # unicode-code-point
    WK_SNI  => '039e0bb7-5dd3-40ee-a98c-596ff6cce405', # sirtx-numerical-identifier
    WK_HDI  => 'f8eb04ef-3b8a-402c-ad7c-1e6814cb1998', # host-defined-identifier
    WK_UDI  => '05af99f9-4578-4b79-aabe-946d8e6f5888', # user-defined-identifier

    NS_WD   => '9e10aca7-4a99-43ac-9368-6cbfa43636df', # Wikidata-namespace
    NS_FC   => '6491f7a9-0b29-4ef1-992c-3681cea18182', # factgrid-namespace
    NS_INT  => '5dd8ddbb-13a8-4d6c-9264-36e6dd6f9c99', # integer-namespace
    NS_DATE => 'fc43fbba-b959-4882-b4c8-90a288b7d416', # gregorian-date-namespace
    NS_GTIN => 'd95d8b1f-5091-4642-a6b0-a585313915f1', # gtin-namespace
    NS_UNICODE_CP => '132aa723-a373-48bf-a88d-69f1e00f00cf', # 'unicode-character-namespace'
};

# Features:
my $enabled_oid = 1;

lib/Data/Identifier.pm  view on Meta::CPAN

    iban => __PACKAGE__->new($well_known_uuid => WK_IBAN),
    bic  => __PACKAGE__->new($well_known_uuid => WK_BIC),
    doi  => __PACKAGE__->new($well_known_uuid => WK_DOI,    validate => RE_DOI),

    # Unofficial, not part of public API:
    unicodecp => __PACKAGE__->new($well_known_uuid => WK_UNICODE_CP, validate => RE_UNICODE, namespace => NS_UNICODE_CP, generate => 'id-based'),

    hdi => __PACKAGE__->new($well_known_uuid => WK_HDI, validate => RE_UINT),
    udi => __PACKAGE__->new($well_known_uuid => WK_UDI, validate => RE_UINT),
);

lib/Data/Identifier.pm  view on Meta::CPAN

        WK_OID()                                =>   6,
        # Unassigned: 7
        'd0a4c6e2-ce2f-4d4c-b079-60065ac681f1'  =>   8, # language-tag-identifier
        WK_WD()                                 =>   9,
        '923b43ae-a50e-4db3-8655-ed931d0dd6d4'  =>  10, # specialises
        'eacbf914-52cf-4192-a42c-8ecd27c85ee1'  =>  11, # unicode-string
        '928d02b0-7143-4ec9-b5ac-9554f02d3fb1'  =>  12, # integer
        'dea3782c-6bcb-4ce9-8a39-f8dab399d75d'  =>  13, # unsigned-integer
        # Unassigned: 14, 15
        '6ba648c2-3657-47c2-8541-9b73c3a9b2b4'  =>  16, # default-context
        '52a516d0-25d8-47c7-a6ba-80983e576c54'  =>  17, # proto-file

lib/Data/Identifier.pm  view on Meta::CPAN

        WK_GTIN()                               => 'gtin',
        WK_IBAN()                               => 'iban',
        WK_BIC()                                => 'bic',
        WK_DOI()                                => 'doi',
        WK_FC()                                 => 'factgrid-identifier',
        WK_UNICODE_CP()                         => 'unicode-code-point',
        WK_SNI()                                => 'sirtx-numerical-identifier',
        WK_HDI()                                => 'host-defined-identifier',
        WK_UDI(),                               => 'user-defined-identifier',
        NS_WD()                                 => 'Wikidata-namespace',
        NS_FC()                                 => 'factgrid-namespace',
        NS_INT()                                => 'integer-namespace',
        NS_DATE()                               => 'gregorian-date-namespace',
        NS_UNICODE_CP()                         => 'unicode-character-namespace',

        'ddd60c5c-2934-404f-8f2d-fcb4da88b633'  => 'also-shares-identifier',
        'bfae7574-3dae-425d-89b1-9c087c140c23'  => 'tagname',
        '7f265548-81dc-4280-9550-1bd0aa4bf748'  => 'has-type',
        'd0a4c6e2-ce2f-4d4c-b079-60065ac681f1'  => 'language-tag-identifier',
        '923b43ae-a50e-4db3-8655-ed931d0dd6d4'  => 'specialises',
        'eacbf914-52cf-4192-a42c-8ecd27c85ee1'  => 'unicode-string',
        '928d02b0-7143-4ec9-b5ac-9554f02d3fb1'  => 'integer',
        'dea3782c-6bcb-4ce9-8a39-f8dab399d75d'  => 'unsigned-integer',
        '6ba648c2-3657-47c2-8541-9b73c3a9b2b4'  => 'default-context',
        '52a516d0-25d8-47c7-a6ba-80983e576c54'  => 'proto-file',
        '1cd4a6c6-0d7c-48d1-81e7-4e8d41fdb45d'  => 'final-file-size',

lib/Data/Identifier.pm  view on Meta::CPAN

        '06aff30f-70e8-48b4-8b20-9194d22fc460'  => 'SEEK_END',
        '59a5691a-6a19-4051-bc26-8db82c019df3'  => 'inode',
        '2c7e15ed-aa2f-4e2f-9a1d-64df0c85875a'  => 'chat-0-word-identifier',
        '53863a15-68d4-448d-bd69-a9b19289a191'  => 'unsigned-integer-generator',
        'e8aa9e01-8d37-4b4b-8899-42ca0a2a906f'  => 'signed-integer-generator',
        'd74f8c35-bcb8-465c-9a77-01010e8ed25c'  => 'unicode-character-generator',
        '55febcc4-6655-4397-ae3d-2353b5856b34'  => 'rgb-colour-generator',
        '97b7f241-e1c5-4f02-ae3c-8e31e501e1dc'  => 'date-generator',
        '19659233-0a22-412c-bdf1-8ee9f8fc4086'  => 'multiplicity-generator',
        '5ec197c3-1406-467c-96c7-4b1a6ec2c5c9'  => 'minimum-multiplicity-generator',
    );

 view all matches for this distribution


Data-JSONSchema-Ajv

 view release on metacpan or  search on metacpan

lib/Data/JSONSchema/Ajv/src.pm  view on Meta::CPAN


=cut

__DATA__
/* ajv 6.8.1: Another JSON Schema Validator */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self...

 view all matches for this distribution


Data-JavaScript

 view release on metacpan or  search on metacpan

t/3-js12.t  view on Meta::CPAN


#Test alphanumeric string output: quoting, ASCII/ANSI escaping, Unicode
## no critic (ProhibitEscapedCharacters, RequireInterpolationOfMetachars)
is join( q//, jsdump( 'ANSI', "M\xF6tley Cr\xFCe" ) ),
  q?var ANSI = "M\xF6tley Cr\xFCe";?,
  'Quoting, ASCII/ANSI escaping, unicode.';

is
  join( q//, jsdump( 'unicode', "Euros (\x{20ac}) aren't Ecus (\x{20a0})" ) ),
  q(var unicode = "Euros (\xE2\x82\xAC) aren't Ecus (\xE2\x82\xA0)";),
  'No real Unicode';

is join( q//, jsdump( 'thang', qq('\t"\n\\\xa0) ) ),
  q(var thang = "'\t\"\n\\\\\xA0";),
  q(var thang = "'\t\"\n\\\xA0");

 view all matches for this distribution


Data-LetterTree

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

pad_sv|||
pad_swipe|||
pad_tidy|||
pad_undef|||
parse_body|||
parse_unicode_opts|||
path_is_absolute|||
peep|||
pending_ident|||
perl_alloc_using|||n
perl_alloc|||n

 view all matches for this distribution


Data-MessagePack-Stream

 view release on metacpan or  search on metacpan

msgpack-3.3.0/Doxyfile  view on Meta::CPAN


HAVE_DOT               = NO

# By default doxygen will write a font called FreeSans.ttf to the output
# directory and reference it in all dot files that doxygen generates. This
# font does not include all possible unicode characters however, so when you need
# these (or just want a differently looking font) you can specify the font name
# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
# which can be done by putting it in a standard location or by setting the
# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
# containing the font.

 view all matches for this distribution


Data-Model

 view release on metacpan or  search on metacpan

lib/Data/Model/Schema.pm  view on Meta::CPAN

                ascii      => {
                    type     => BOOLEAN,
                    optional => 1,
                },

=head2 unicode

                unicode    => {
                    type     => BOOLEAN,
                    optional => 1,
                },

=head2 default

 view all matches for this distribution


Data-ParseBinary

 view release on metacpan or  search on metacpan

lib/Data/ParseBinary.pm  view on Meta::CPAN

    UTF-8
    utf8
    or any single-byte encoding supported by the Encode module
    for example: iso-8859-8

If you don't know if your unicode string is BE or LE, then it's probably BE.

=head3 String (constant length / meta)

A string with constant length:

 view all matches for this distribution


Data-Password-passwdqc

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

parse_fullstmt||5.013005|
parse_label||5.013007|
parse_listexpr||5.013008|
parse_stmtseq||5.013006|
parse_termexpr||5.013008|
parse_unicode_opts|||
parser_dup|||
parser_free|||
path_is_absolute|||n
peep|||
pending_Slabs_to_ro|||

ppport.h  view on Meta::CPAN

#ifndef PERL_PV_PRETTY_REGPROP
#  define PERL_PV_PRETTY_REGPROP         PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif

/* Hint: pv_escape
 * Note that unicode functionality is only backported to
 * those perl versions that support it. For older perl
 * versions, the implementation will fall back to bytes.
 */

#ifndef pv_escape

 view all matches for this distribution


( run in 0.789 second using v1.01-cache-2.11-cpan-88abd93f124 )