App-Dex

 view release on metacpan or  search on metacpan

scripts/dex  view on Meta::CPAN

8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
        }
        $tokens[-2] .= $next_line->[2];
        $self->set_next_line(undef);
        $start = 0;
    }
}
 
sub _read_quoted_tokens {
    my ($self, $start, $first, $yaml, $tokens) = @_;
    my $quoted = '';
    my $decoded = '';
    my $token_name = $TOKEN_NAMES{ $first };
    if ($first eq "'") {
        my $regex = $REGEXES{SINGLEQUOTED};
        if ($$yaml =~ s/\A($regex)//) {
            $quoted .= $1;
            $decoded .= $1;
            $decoded =~ s/''/'/g;
        }
    }
    else {
        ($quoted, $decoded) = $self->_read_doublequoted($yaml);
    }
    my $eol = '';
    unless (length $$yaml) {
        if ($quoted =~ s/($RE_WS+)\z//) {
            $eol = $1;
            $decoded =~ s/($eol)\z//;
        }
    }
    my $value = { value => $decoded, orig => $quoted };
 
    if ($$yaml =~ s/\A$first//) {
        if ($start) {
            push @$tokens, ( $token_name . 'D' => $value, $self->line );
        }
        else {
            push @$tokens, ( $token_name . 'D_LINE' => $value, $self->line );
        }
        push @$tokens, ( $token_name => $first, $self->line );
        return $value;

scripts/dex  view on Meta::CPAN

8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
    push @$tokens, ( $token_name . 'D_LINE' => $value, $self->line );
    push @$tokens, ( EOL => $eol, $self->line );
 
    return $value;
}
 
sub _read_doublequoted {
    my ($self, $yaml) = @_;
    my $quoted = '';
    my $decoded = '';
    while (1) {
        my $last = 1;
        if ($$yaml =~ s/\A([^"\\]+)//) {
            $quoted .= $1;
            $decoded .= $1;
            $last = 0;
        }
        if ($$yaml =~ s/\A($RE_ESCAPES)//) {
            $quoted .= $1;
            my $dec = defined $2 ? $CONTROL{ $2 }
                        : defined $3 ? chr hex $3
                        : defined $4 ? chr hex $4
                        : chr hex $5;
            $decoded .= $dec;
            $last = 0;
        }
        if ($$yaml =~ s/\A(\\)\z//) {
            $quoted .= $1;
            $decoded .= $1;
            last;
        }
        last if $last;
    }
    return ($quoted, $decoded);
}
 
sub _fetch_next_tokens_directive {
    my ($self, $yaml, $eol) = @_;
    my @tokens;
 
    if ($$yaml =~ s/\A(\s*%YAML)//) {
        my $dir = $1;
        if ($$yaml =~ s/\A( )//) {
            $dir .= $1;

scripts/dex  view on Meta::CPAN

10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
      +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC
      AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=
    # The binary value above is a tiny arrow encoded as a gif image.
    EOM
 
=head1 DESCRIPTION
 
 
By prepending a base64 encoded binary string with the C<!!binary> tag, it can
be automatically decoded when loading.
 
Note that the logic for dumping is probably broken, see
 
Suggestions welcome.
 
=head1 METHODS
 
=over



( run in 0.435 second using v1.01-cache-2.11-cpan-5f2e87ce722 )