Unique

Unique id

PhilipRBrenan@yahoo.com, 2004, Perl license

Synopsis

Example t/unique.t

#_ Unique _____________________________________________________________
# Unique           
# philiprbrenan@yahoo.com, 2004, Perl License    
#______________________________________________________________________

use Math::Zap::Unique;
use Test::Simple tests=>3;
   
ok(unique() ne unique());
ok(unique() ne unique());
ok(unique() ne unique());

Description

Returns a unique id each time it is called.

package Math::Zap::Unique;
$VERSION=1.06;
use Carp;

Constructors

unique

Return new unique id

my $unique = 0;

sub unique() {++$unique}

new

Return new unique id, synonym for "unique"

sub new {unique()}

Exports

Export "unique"

use Math::Zap::Exports qw(
  unique ()
 );

#_ Unique _____________________________________________________________
# Package loaded successfully
#______________________________________________________________________

1;

Credits

Author

philiprbrenan@yahoo.com

philiprbrenan@yahoo.com, 2004

License

Perl License.