Dados :: xhash.

estendido, encomendado hash (comumente conhecido como uma matriz ou mapa associativo) com travessia de caminho-chave e auto ...
Baixe Agora

Dados :: xhash. Classificação e resumo

Propaganda

  • Rating:
  • Licença:
  • Perl Artistic License
  • Preço:
  • FREE
  • Nome do editor:
  • Brian Katzung
  • Site do editor:
  • http://search.cpan.org/~bkatzung/

Dados :: xhash. Tag


Dados :: xhash. Descrição

Dados :: XHash é um módulo Perl que fornece uma interface orientada a objetos amarrado, hashes ordenados. Os elementos de hash podem ser atribuídos em chaves explicitamente ou automaticamente em matrizes de moda de mistura e correspondência no PHP.it também incluem suporte para árvores de xhashes aninhadas, travers de árvores e conversão de e das estruturas de dados Perl nativas. Os usos de configuração estruturados incluem informações sobre configuração estruturada ou parâmetros de consulta HTTP em que a ordem pode, pelo menos, por vezes, ser significativa, para passar parâmetros posicionais e nomeados mistos, ou para portadores de código PHP.Synopsis Use dados :: Xhash; Use dados :: xhash qw / xhash xhashref /; Use dados :: XHASH QW / XH XHN XHR XHRN /; $ tiedhref = dados :: xhash-> novo (); # Um abençoado e amarrado Hashref # Nota: Não ligue para "amarrar" você mesmo! # Exportações são atalhos para chamar dados :: xhash-> new () -> push () # ou dados :: xhash-> new () -> pushref () para você. $ tiedhref = xh ('indexado automaticamente', {key => 'valor'}); $ tiedhref = xhash ('indexado automaticamente', {key => 'valor'}); $ tiedhref = xhashref (); $ tiedhref = Xhn ('olá', {raiz => {ramo => }}}}); # (aninhado) $ tiedhref = xhr (); $ tiedhref = xHrn (}}}}}}}}}} # (aninhado) # Nota: $ xhash significa que você pode usar $ tiedhref ou o número # subjacente em marcado (% $ tiedhref) ## hash-like operations # obtendo chaves ou caminhos $ valor = $ tiedhref -> {$ key} ; $ Value = $ Tiedhref -> {\ @ path}; $ Value = $ xhash-> buscar ($ tecla); $ valor = $ xhash-> buscar (\ @ caminho); # Auto-vivificar um dado :: xhash no final do caminho $ tiedhref2 = $ tiedhref1 -> {}; $ tiedhref -> {} -> $ egs_xh_method (...); $ tiedhref = $ xhash-> buscar (@path, {}]); $ xhash-> buscar (@Path, {}]) -> $ egs_xh_method (...); # Configuração de chaves ou caminhos $ tiedhref -> {$ key} = $ valor; $ tiedhref -> {\ @ path} = $ valor; $ xhash-> Loja (chave $, $ valor,% opções); $ xhash-> Loja (\ @ caminho, $ valor,% opções); # Definindo a próxima tecla de índice automático $ tiedhref -> {[]} = $ valor; # Recomendado sintaxe $ tiedhref -> {+ undef} = $ valor; $ tiedhref -> {} = $ valor; # Qualquer chaves de caminho pode ser UNDEF $ Xhash-> Loja ([], $ Valor,% Opções); $ Xhash-> Loja (Redef, $ Valor,% Opções); $ xhash-> Loja (, $ valor,% opções); # Limpe o Xhash% $ Tiedhref = (); $ xhash-> claro (); # Excluir uma tecla e obter seu valor $ valor = delete $ tiedhref -> {$ key}; # ou \ @Path $ valor = $ xhash-> excluir (chave $); # ou \ @path # faz uma chave existe? $ boolean = existe $ tiedhref -> {$ key}; # ou \ @Path $ boolean = $ xhash-> existe ($ tecla); # ou \ @Path # chaves e listas de chaves @keys = teclas% $ tiedhref; # Todas as chaves; redefine o iterador @keys = $ xhash-> chaves (% opções); $ Key = $ xhash-> first_key (); $ key2 = $ xhash-> next_key ($ Key1); $ key = $ xhash-> last_key (); $ key = $ xhash-> next_index (); # A próxima chave de índice automático # Valores @All_Values = Valores% $ Tiedhref; @some_values = @ {% $ tiedhref} {@ keys}; # ou pathrefs @all_values = $ xhash-> valores (); @some_values = $ xhash-> valores (\ @ chaves); # ou pathrefs (chave $, valor $) = cada (% $ tiedhref); # Key / Value Iteration # O hash contém quaisquer pares de chave / valor? $ boolean = escalar (% $ tiedhref); $ boolean = $ xhash-> escalar (); ## Operações semelhantes a array $ valor = $ xhash-> pop (); # Último valor ($ chave, $ valor) = $ xhash-> pop (); # Última tecla / valor $ valor = $ xhash-> shift (); # primeiro valor ($ chave, $ valor) = $ xhash-> shift (); # primeiro chave / valor # anexar valores ou {keys => valores} $ xhash-> empurrar (@elements); $ xhash-> Pushref (\ @ elementos,% opções); # Inserir valores ou {keys => valores} $ xhash-> não é de ignição (@elements); $ xhash-> desanimador (\ @ elementos,% opções); # Exporte em Moda Like de Array @List = $ xhash-> AS_ARRAY (% Opções); $ LIST = $ XHASH-> AS_ARRAYREF (% Opções); # Exportação em fasão semelhante a hash @list = $ xhash-> as_hash (% options); $ LIST = $ XHASH-> AS_HASHREF (% Opções); # Reorder Elements $ Xhash-> Referência (Referência $, @keys); # [] = classificados index_only # remap elementos $ xhash-> remap (% de mapeamento); # ou \% mapeamento $ xhash-> renumerar (% opções); ## Métodos de tiehash - Veja Perltie # TieHash, Buscar, Loja, Limpar, FirstKey, Homepage do NexkeyProduct


Dados :: xhash. Software Relacionado