PPT-Folie

  • Data::Locations are typeglobs, filehandles and objects

    at the same time

  • The typeglob is blessed into the Data::Locations class

  • The filehandle is tied to the object (i.e., to itself,

    because Perl confuses typeglobs and filehandles)

  • The typeglob's slots ($, @, %) contain the object's data

    (the "@" slot actually contains the user's data)

  • Symbolic references are used as "weak references"

    for internal interconnections

  • The reference count is adjusted so that the Location will

    be destroyed when user's last reference goes out of scope

  • The symbol table %Data::Locations:: is used as index

    (for "weak reference" lookups and global destruction)

    Previous slide
    Next slide
    Back to first slide
    Show graphics version