Hash :: tipo.

ISH :: Type Module contiene pseudo-hashes come array legati a un "tipo" (elenco di campi).
Scarica ora

Hash :: tipo. Classifica e riepilogo

Annuncio pubblicitario

  • Rating:
  • Licenza:
  • Perl Artistic License
  • Prezzo:
  • FREE
  • Nome editore:
  • Laurent Dami
  • Sito web dell'editore:
  • http://search.cpan.org/~dami/

Hash :: tipo. Tag


Hash :: tipo. Descrizione

Il modulo Hash :: Tipo contiene pseudo-has come array legati a un "tipo" (elenco dei campi). Hash :: Modulo tipo contiene pseudo-hashes come array legati a un "tipo" (elenco dei campi) .synopsis usa l'hash :: Type; # Crea un hash :: Type My $ persontyType = New Hash :: Type (QW (FirstName LastName City)); # Crea e popola alcuni hash legati a $ persontype tirante% wolfgang, $ persontype, "wolfgang amadeus", "mozart", "salisburgo"; $ Ludwig = New $ persontype ("Ludwig", "van Beethoven", "Vienna"); $ jsb = new $ persontype; $ JSB -> {City} = "Leipzig"; @ {$ jsb} {qw (firstname lastname)} = ("Johann Sebastian", "Bach"); # Aggiungi campi dinamicamente $ persontytype-> Aggiungi ("nascita", "morte") o morire "campi non aggiunti"; $ wolfgang {nascita} = 1750; # Esempio più completo: leggi un file piatto con intestazioni sulla prima riga My ($ headerline, @datalines) = mappa {chomp; $ _}; My $ HT = New Hash :: Type (Spalato / T /, $ Headerline); foreach My $ LINE (@Datalines) {My $ Data = New $ HT (Spalato / T /, $ LINE); work_with ($ dati -> {somefield}, $ dati -> {someotherfield}); } # Un'alternativa al tempo :: GMTIME E TIME :: LOCALITTIME My $ TimeType = New Hash :: Type QW (Sec Min Hour Mday Mon Year Genday Yday); My $ LOOCHTTIME = NUOVO $ TimeType (locali); My $ GMTime = New $ TimeType (GMTime); Stampa $ Localtime -> {ora} - $ GMTime -> {ora}, "Le ore di differenza per GMT"; # Funzioni di confronto My $ Byage = $ persontype-> cmp ("nascita: -num, lastname, firstname"); My $ BYNAMELENGTH = $ persontytype-> cmp (lastname => {lunghezza ($ b) lunghezza ($ a)}, lastname => 'alfa', firstname => 'alfa'); Showperson ($ _) foreach (ordinare $ Byave @people); Showperson ($ _) foreach (ordinare $ Bynamength @People); # confronti speciali: date my $ US_DateCMP = $ $ myhashtype-> cmp ("Somedatefield: m / d / y"); My $ FR_INVERSEDATECMP = $ MYHASHTYPE-> CMP ("Somedatefield: -d.m.y"); Requisiti: · Perl.


Hash :: tipo. Software correlato

Wx :: perl :: packager

WX :: Perl :: Packager fornisce un modulo per assistere le applicazioni basate su WX con PAR, ActiveState Perlapp / PDK e Perl ...

180

Scarica

Medsphere.widgets.

medsphere.widgets è una raccolta di elementi di interfaccia multipiattaforma per GTK # utilizzati dai prodotti di MedSphere. ...

243

Scarica