Win32::Guidgen - Perl extension that generates GUID strings.
use strict; use Win32::Guidgen; my $guid = Win32::Guidgen::create(); print "New GUID is $guid\n"; my $guid = Win32::Guidgen::gen(); print "New GUID is $guid\n"; my $guid = Win32::Guidgen::generate(); print "New GUID is $guid\n";
Win32::Guidgen generate Generates Globally Unique Identifiers (GUIDs).
It exposes 3 methods: create(), gen() and generate(), which all return a string formatted like the following sample:
create()
gen()
generate()
{C200E360-38C5-11CE-AE62-08002B2B79EF}
where the successive fields break the GUID into the form DWORD-WORD-WORD-WORD-WORD.DWORD covering the 128-bit GUID. The string includes enclosing braces, which are an OLE convention.
DWORD
WORD
None by default.
You install Win32::Guidgen, as you would install any perl module library, by running these commands:
Win32::Guidgen
perl Makefile.PL make make test make install
Win32::Guidgen was written by Joe P. Hayes <joephayes@_NOSPAM_yahoo.com> (Take out '_NOSPAM_', to send.) in 2001. Neil Hunt <neilh@_NOSPAM_thehunts.id.au<gt>> contributed a new version of the GUID generator in 2004.
The Win32::Guidgen module is Copyright (c) 2001 Joe P. Hayes. All Rights Reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
The Win32::Guidgen module is free software.
IT COMES WITHOUT WARRANTY OF ANY KIND.
Commercial support for Perl can be arranged via The Perl Clinic. For more details visit:
http://www.perlclinic.com
To install Win32::Guidgen, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::Guidgen
CPAN shell
perl -MCPAN -e shell install Win32::Guidgen
For more information on module installation, please visit the detailed CPAN module installation guide.