| Io :: wraptie Envolver objetos tiables en IO :: Interfaz de manejo |
Descargar ahora |
Io :: wraptie Clasificación y resumen
- Licencia:
- Perl Artistic License
- Nombre del editor:
- David F. Skoll
- Sitio web del editor:
- http://search.cpan.org/~dskoll/IO-stringy-2.110/lib/IO/Stringy.pm
Io :: wraptie Etiquetas
Io :: wraptie Descripción
Envolver objetos tiables en io :: interfaz de asa Io :: Wraptie es un módulo PERL para envolver objetos tiables en Io :: Manillar Interface.SynopsSisfirst de todos, necesitará corbata (), por lo que: requiera 5.004; Interfaz de función (experimental). Use esto con cualquier clase existente ... Use Io :: Wraptie; usar foohandle; ### implementa la interfaz de TienHandle ### Supongamos que queremos un "foohandle-> nuevo (FOO_RDWR, 2)". ### Podemos decir ... $ fh = wraptie ('foohandle', foo_rdwr, 2); ### Ahora podemos usar ... Imprimir $ FH "Hola,"; ### Sintaxis de operador tradicional ... $ FH-> Imprimir ("¡Mundo! "); ### ... y la sintaxis de OO también! OO Interfaz (preferida). Puedes heredar desde el IO :: Wraptie :: Slave Mixin para obtener un ingenio New_Tie () Constructor ... # ---- -------------------------- PAQUETE FOOHANDLE; ### A CLASE QUE PUEDE TIE TIENDLE UTILIZAR IO :: WRAPTE; @isa = QW (IO: : Wraptie :: esclavo); ### heredar new_tie () ... # ------------------------------ Paquete principal ; $ Fh = foohandle-> new_tie (foo_rdwr, 2); ### $ FH es un IO :: Wraptie :: Master Print $ FH "Hola,"; ### Sintaxis de operador tradicional $ FH-> Imprimir ("World ! "); ### OO Requisitos de sintaxis: · Perl
Io :: wraptie Software relacionado