MATSUNO★Tokuhiro > HTTP-MobileAttribute > HTTP::MobileAttribute::Plugin::Display

Download:
HTTP-MobileAttribute-0.21.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

HTTP::MobileAttribute::Plugin::Display - ディスプレイサイズの情報を得る

DESCRIPTION ^

    use HTTP::MobileAttribute plugins => [ {
        module => 'Display',
        config => {
            DoCoMoMap => +{
                D209I => +{ color => 1 depth => 256 height => 90 width => 96 },
                # snip ...
            }
        }
    }];

    HTTP::MobileAttribute->new($ua)->display; # => instance of HTTP::MobileAttribute::Plugin::Display::Display

DESCRIPTION ^

'display' メソッドを呼ぶと、HTTP::MobileAttribute::Plugin::Display::Display のインスタンスをえることができます。 このオブジェクトは width, height, color, depth の 4 種類の属性をもっています。

DoCoMo は、HTTP Header 等からこの情報をうけとることができないので、データをプラグインにわたす必要があります。 この情報は、 DoCoMo からマシンリーダブルな形式では提供されていないので WWW::MobileCarrierJP 等を駆使してスクレイピングする必要があります。

これを行うスクリプトは tools/make-docomo-display-map.pl として同梱してあります。

AUTHORS ^

Tokuhiro Matsuno

SEE ALSO ^

HTTP::MobileAttribute