Michael G Schwern > Test-Simple-1.005000_005 > TB2::HasObjectID

Download:
Test-Simple-1.005000_005.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 1.005000_004   Source   Latest Release: Test-Simple-1.005000_006

NAME ^

TB2::HasObjectID - a unique id in the current process

SYNOPSIS ^

    package My::Thing;

    use TB2::Mouse;
    with "TB2::HasObjectID";

    my $thing = My::Thing->new;
    my $id = $thing->object_id;

DESCRIPTION ^

Provides a method for generating unique ids for many TB2 objects.

Useful if, for example, an EventHandler posts its own events and doesn't want to process them twice.

object_id

    my $id = $thing->object_id;

Returns an identifier for this object unique to the running process. The identifier is fairly simple and easily predictable.

syntax highlighting: