{"id":30211315,"url":"https://github.com/mons/lib-abs","last_synced_at":"2025-08-13T20:36:04.760Z","repository":{"id":65734018,"uuid":"537932","full_name":"Mons/lib-abs","owner":"Mons","description":"The same as lib, but makes relative path absolute. ","archived":false,"fork":false,"pushed_at":"2020-06-02T13:14:27.000Z","size":335,"stargazers_count":4,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-10T20:33:10.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://search.cpan.org/dist/lib-abs/","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mons.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-02-26T21:41:48.000Z","updated_at":"2020-11-03T17:57:03.000Z","dependencies_parsed_at":"2023-02-07T07:16:31.182Z","dependency_job_id":null,"html_url":"https://github.com/Mons/lib-abs","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/Mons/lib-abs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2Flib-abs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2Flib-abs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2Flib-abs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2Flib-abs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mons","download_url":"https://codeload.github.com/Mons/lib-abs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mons%2Flib-abs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270305893,"owners_count":24562113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-13T20:34:31.012Z","updated_at":"2025-08-13T20:36:04.738Z","avatar_url":"https://github.com/Mons.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    lib::abs - \"lib\" that makes relative path absolute to caller.\n\nSYNOPSIS\n    Simple use like \"use lib ...\":\n\n        use lib::abs qw(./mylibs1 ../mylibs2);\n        use lib::abs 'mylibs';\n\n        # if your path may not exists and it is ok, then:\n        use lib::abs -soft =\u003e qw(./mylibs1 ../mylibs2);\n\n    Extended syntax (glob)\n\n        use lib::abs 'modules/*/lib';\n\n    There are also may be used helper function from lib::abs (see\n    example/ex4):\n\n        use lib::abs;\n        # ...\n        my $path = lib::abs::path('../path/relative/to/me'); # returns absolute path\n\nDESCRIPTION\n    The main reason of this library is transformate relative paths to\n    absolute at the \"BEGIN\" stage, and push transformed to @INC. Relative\n    path basis is not the current working directory, but the location of\n    file, where the statement is (caller file). When using common \"lib\",\n    relative paths stays relative to curernt working directory,\n\n        # For ex:\n        # script: /opt/scripts/my.pl\n        use lib::abs '../lib';\n\n        # We run `/opt/scripts/my.pl` having cwd /home/mons\n        # The @INC will contain '/opt/lib';\n\n        # We run `./my.pl` having cwd /opt\n        # The @INC will contain '/opt/lib';\n\n        # We run `../my.pl` having cwd /opt/lib\n        # The @INC will contain '/opt/lib';\n\n    Also this module is useful when writing tests, when you want to load\n    strictly the module from ../lib, respecting the test file.\n\n        # t/00-test.t\n        use lib::abs '../lib';\n\n    Also this is useful, when you running under \"mod_perl\", use something\n    like \"Apache::StatINC\", and your application may change working\n    directory. So in case of chdir \"StatINC\" fails to reload module if the\n    @INC contain relative paths.\n\nRATIONALE\n    Q: We already have \"FindBin\" and \"lib\", why we need this module?\n\n    A: There are several reasons:\n\n    1) \"FindBin\" could find path incorrectly under \"mod_perl\"\n    2) \"FindBin\" works relatively to executed binary instead of relatively\n    to caller\n    3) Perl is linguistic language, and `use lib::abs \"...\"' semantically\n    more clear and looks more beautiful than `use FindBin; use lib\n    \"$FindBin::Bin/../lib\";'\n    4) \"FindBin\" b\u003cwill\u003e work incorrectly, if will be called not from\n    executed binary (see \u003chttp://github.com/Mons/lib-abs-vs-findbin\u003e\n    comparison for details)\n\nBUGS\n    None known\n\nCOPYRIGHT AND LICENSE\n    This software is copyright (c) 2007-2020 by Mons Anderson.\n\n    This is free software; you can redistribute it and/or modify it under\n    the same terms as the Perl 5 programming language system itself.\n\nAUTHOR\n    Mons Anderson, \"\u003cmons@cpan.org\u003e\"\n\nCONTRIBUTORS\n    Oleg Kostyuk, \"\u003ccub@cpan.org\u003e\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmons%2Flib-abs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmons%2Flib-abs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmons%2Flib-abs/lists"}