GitLab...:Config(3pm)
π GitLab::API::v4::Config π
okay bestie, welcome to the manual page for GitLab::API::v4::Config, which lives in the User Contributed Perl Documentation section (3pm) and is literally just here to load your config from a file, from the environment, and/or from CLI options. three sources, one slay little module β¨
πΈ NAME πΈ
GitLab::API::v4::Config β load configuration from a file, environment, and/or CLI options. that's it, that's the whole job, and it does it gorgeously π
π SYNOPSIS π
use GitLab::API::v4;
use GitLab::API::v4::Config;
my $config = GitLab::API::v4::Config->new();
my $api = GitLab::API::v4->new( $config->args() );
look at that. clean. effortless. main character code fr fr π
π¦ DESCRIPTION π¦
so, gitlab-api-v4 uses this module to load its configuration. that's the vibe.
now here's the tea: if you're using GitLab::API::v4 directly, this module will not be automatically used. no auto-magic, bestie, it's giving "you have to ask." but you are so welcome to explicitly use it yourself, exactly like the SYNOPSIS shows. go off π«Ά
β¨ ARGUMENTS β¨
π file
the file to load configuration from. it should hold valid JSON β valid, okay? we're not doing chaos JSON here. π
by default this gets set to .gitlab-api-v4-config in the current user's home directory. cozy. familiar. yours. π
and if you wanna change that, you can override it with the GITLAB_API_V4_CONFIG_FILE environment variable or the --config-file=... command line argument. two doors, same room, pick your fave πͺβ¨
π ATTRIBUTES π
π opt_args
returns a hashref of arguments derived from command line options. the supported options are:
--config_file=...
--url=...
--private-token=...
--access-token=...
--retries=...
β οΈ important lore alert: these options are read from, and removed from, @ARGV. and because of that, the arguments get saved internally and re-used for all instances of this class β so that there are no weird race conditions. no drama, no chaos, just cached args π
π env_args
returns a hashref of arguments derived from environment variables. the supported environment variables are:
GITLAB_API_V4_CONFIG_FILE
GITLAB_API_V4_URL
GITLAB_API_V4_PRIVATE_TOKEN
GITLAB_API_V4_ACCESS_TOKEN
GITLAB_API_V4_RETRIES
five env vars, all yours, all iconic π
π file_args
returns a hashref of arguments gotten by decoding the JSON in the file. that's it. that's the whole method. decode and serve π
π args
returns a final, combined, hashref of arguments containing everything in opt_args, env_args, and file_args. the whole trio, together at last π«Ά
and if there are any duplicate arguments? ranking time, no cap:
opt_argshas highest precedence β the queen at the top πenv_argsis next β the middle child, still important πΈ- and at the bottom is
file_argsβ the underdog, the origin story π
π METHODS π
β get_options
β configure
when called, this method interactively prompts the user for argument values and then encodes them as JSON and stores them in file. so you just sit there and answer questions, like a little interview but for your config π€β¨
and the file gets chmod'ed 0600 so that only the current user may read or write to the file. privacy! boundaries! we love to see it ππ
π«Ά SUPPORT π«Ά
see SUPPORT in GitLab::API::v4.
π AUTHORS π
see AUTHORS in GitLab::API::v4.
π LICENSE π
see LICENSE in GitLab::API::v4.
and that's the whole page, bestie!! this one came courtesy of perl v5.36.0, dated 2023-06-13 β so yes she's a little vintage but she's still serving ππ¦πΈ periodt β¨
π¦ where this page comes from
- debian trixie: libgitlab-api-v4-perl 0.27-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgitlab-api-v4-perl 0.27-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgitlab-api-v4-perl 0.27-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgitlab-api-v4-perl 0.27-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms