The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::AutoBuild::Platform - represents a build host's environment

SYNOPSIS

  use Test::AutoBuild::Platform;

  # Create a new platform based on the host machine's native
  # environment
  my $platform = Test::AutoBuild::Platform->new(name => "host");


  # Or create a platform describing a chroot environment which
  # has a differing OS, but same architecture
  my $platform = Test::AutoBuild::Platform->new(name => "host",
                                                label => "Fedora Core 3");

  # Or create a platform describing an emulated OS
  my $platform = Test::AutoBuild::Platform->new(name => "host",
                                                label => "Free BSD",
                                                operating_system => "bsd",
                                                architecture => "x86_64");

  # Create a platform describing the host, with some 'interesting'
  # extra metadata about the toolchain
  my $platform = Test::AutoBuild::Platform->new(name => "host",
                                                options => {
          'compiler.cc' => "GCC 3.2.3",
          'compiler.c++' => "G++ 3.2.3",
          'linker' => "GNU LD 2.15",
        });

METHODS

my $stage = Test::AutoBuild::Platform->new(name => $name, [label => $label,]); [architecture => $arch,]); [operating_system => $os,] [options => \%options]);

Creates a new platform object describing a build root environment. The name parameter is a short tag for the platform. The optional label parameter is a free text descriptive title for the platform, typically the OS distribution name. If omitted, the first line of /etc/issue will be used. The architecture parameter is the formal machine architecture, defaulting to the 'machine' field from the uname(2) system call. The operating_system parameter is the formal operating system name, defaulting to the 'sysname' field from the uname(2) system call. The optional options parameter is a hash reference containing arbitrary deployment specific metadata about the platform.

$value = $platform->option($name[, $newvalue]);

Retrieves a custom option describing a custom aspect of the build host platform, identified as interesting by the administrator. If the $newvalue parameter is supplied, then the configuration option is updated.

my @names = $platform->options;

Return a list of all custom options set against this platform. The names returned can be used in calling the option method to lookup a value.

AUTHORS

Daniel Berrange <dan@berrange.com>, Dennis Gregorovic <dgregorovic@alum.mit.edu>

COPYRIGHT

Copyright (C) 2005 Daniel Berrange

SEE ALSO

perl(1), Test::AutoBuild, Test::AutoBuild::Runtime