{
    "mode": "perldoc",
    "parameter": "Net::Twitter::Role::InflateObjects",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter%3A%3ARole%3A%3AInflateObjects/json",
    "generated": "2026-06-13T07:34:34Z",
    "synopsis": "use Net::Twitter;\nmy $nt = Net::Twitter->new(traits => [qw/InflateObjects API::Rest/]);\n$nt->credentials($username, $password);\n$r = $nt->friendstimeline;\n$r->[0]->user->name; # return values are objects with read accessors\n$r->[0]->createdat; # dates are inflated to DateTime objects\n$r->[0]->relativecreatedat; # \"6 minutes ago\"",
    "sections": {
        "NAME": {
            "content": "Net::Twitter::Role::InflateObjects - Inflate Twitter API return values to Moose objects\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 4.01043\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Net::Twitter;\nmy $nt = Net::Twitter->new(traits => [qw/InflateObjects API::Rest/]);\n\n$nt->credentials($username, $password);\n\n$r = $nt->friendstimeline;\n\n$r->[0]->user->name; # return values are objects with read accessors\n$r->[0]->createdat; # dates are inflated to DateTime objects\n$r->[0]->relativecreatedat; # \"6 minutes ago\"\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This role provides inflation of HASH refs, returned by the Twitter API, into Moose objects. URLs\nare inflated to URI objects. Dates are inflated to DateTime objects. Objects that have a\n\"createdat\" attribute also have a \"relativecreatedat\" method that prints times in the same\nstyle as the Twitter web interface.\n\nAll HASH members have read accessors, so\n\n$r->[0]->{user}{screenname}\n\nCan be accessed as\n\n$r->[0]->user->screenname\n",
            "subsections": []
        },
        "CAVEATS": {
            "content": "An accessor is created for each HASH key returned by Twitter. As Twitter adds new attributes,\nInflateObjects will create accessors for them. However, InflateObjects will also drop accessors\nif Twitter drops the corresponding HASH element. So, code that relies on HASH element will fail\nloudly if Twitter drops support for it. (This may be a feature!)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Marc Mims <marc@questright.com>\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "Copyright (c) 2016 Marc Mims\n\nThe Twitter API itself, and the description text used in this module is:\n\nCopyright (c) 2009 Twitter\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        }
    },
    "summary": "Net::Twitter::Role::InflateObjects - Inflate Twitter API return values to Moose objects",
    "flags": [],
    "examples": [],
    "see_also": []
}