The manakai project


Defaults of platform-dependent configurations


  use Web::Transport::PlatformInfo;
  $info = Web::Transport::PlatformInfo->new_default;
  $info_mobile = Web::Transport::PlatformInfo->new_mobile;
  warn $info->user_agent;
  warn $info_mobile->user_agent;


The Web::Transport::PlatformInfo class is a typical implementation of the underlying platform information object (See "UNDERLYING PLATFORM INFORMATION OBJECT" in Web::Transport).


There are following methods:

$info = Web::Transport::PlatformInfo->new_default

Create and return a default platform information object.

$info = Web::Transport::PlatformInfo->new_mobile

Create and return a default platform information object for mobile browsers.

$info = Web::Transport::PlatformInfo->new_from_device_os_navigator ($device, $os, $navigator)

Create and return a platform information object.

The first argument is the device type, i.e. desktop (desktop browsers), tablet (tablet browsers), or mobile (smartphone browsers). The second argument is the OS, i.e. windows, mac, ios, or linux. The third argument is the navigator compatibility mode, i.e. chrome, webkit, or gecko.

If the arguments are invalid comabinations of values, an exception is thrown.


Wakaba <>.


Copyright 2018 Wakaba <>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.