Dados :: Mergulhador

Dados :: Diver é um acesso simples e ad-hoc a elementos de estruturas profundamente aninhadas.
Baixe Agora

Dados :: Mergulhador Classificação e resumo

Propaganda

  • Rating:
  • Licença:
  • Perl Artistic License
  • Preço:
  • FREE
  • Nome do editor:
  • Tye McQueen
  • Site do editor:
  • http://search.cpan.org/~tyemq/Data-Diver-1.0101/Diver.pm

Dados :: Mergulhador Tag


Dados :: Mergulhador Descrição

Dados :: O mergulhador é um acesso simples e ad-hoc a elementos de estruturas profundamente aninhadas. Dados :: O mergulhador é um acesso simples e ad-hoc a elementos de estruturas profundamente aninhadas.summaryData :: Diver fornece as funções de mergulho () e dival () para acesso ad-hoc a elementos de estruturas de dados profundamente aninhadas, e o Diveref (Diveref ), DiveError (), Diveclear () e Divedie () Suporte Funções.Synopsis Use dados :: Diver QW (Dive Diveref DiveError); Minha $ root = {top => ,}; # Define $ Value para 'Sim' # # ($ root -> {top} {segundo} {key} {três} {} {} {} {} {}} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} { Segunda chave 3 três existe)); # Define $ Value para UNDEF () Porque "ausente" não existe: $ Value = Dive ($ raiz, QW (Top 1 Segunda tecla 3 três ausentes)); # Define $ Value para UNDEF () porque # $ root -> {top} {segundo} {key} está fora do final da matriz: $ Value = Dive ($ raiz, qw (top 1 segundo Chave 4 ...)); # Define $ Value para UNDEF () porque # $ root -> {top} {segundo} {key} seria um erro fatal: $ Value = Dive ($ raiz, QW (Top 1 segunda chave -5 ...)); # Define $ ref para $ root -> {top} {novo} {sub} (que cresce # @ {$ raiz -> {top}} e autovifica dois hashes anônimos): meu $ ref = diverf ($ raiz , QW (top 9 novo sub)); # morrer () s Porque "outro" não é um número válido: $ Ref = Diveref ($ raiz, QW (top ...)); # Faz: $ raiz -> {num} {1} {2} = 3; # (Autovivifizo hashes apesar das teclas numéricas.) DIVEVAL ($ raiz, (QW (NM 12))) = 3; # Mesma coisa: $ {Diveref ($ raiz, 'num', 1, 2)} = 3; # Recupera o valor acima, $ valor = 3: $ valor = diveval ($ raiz, 'num', 1, 2); # Mesma coisa: $ Value = $ {Diveref ($ raiz, (QW (Num 12)))}; # Tenta fazer $ root -> {top} {1} e morrer # porque $ root -> {top} é uma referência de matriz: diverso ($ raiz, 'top', 1); # Para apenas autovivify na última etapa: $ ref = Diveref (Mergulho (Raiz $, QW (Top 1 Segunda Chave 3 três)), 'ausente'); if ($ ref) {$$ ref = 'eu também'} else {my ($ nedref, $ svkey, $ errdesc) = DiveError (); morrer "não poderia desreferenciar $ Nedref via $$ SvKey: $ errdescn"; } Requisitos: · Perl.


Dados :: Mergulhador Software Relacionado

XML :: Regras.

XML :: Regras é um módulo Perl que pode analisar as tags XML e processo por regras a partir de folhas. ...

182

Download