PkgConf...nf::Util(3)

πŸ“¦
version 0.11 Β· 2 versions
, in fedora 43

✨ PkgConfig::LibPkgConf::Util β€” the manual page, bestie edition ✨

okay so real quick before anything else: this is PkgConfig::LibPkgConf::Util(3), part of the User Contributed Perl Documentation situation. it's the lil grab-bag of helper functions that ship with libpkgconf but aren't object-oriented, so they don't get a whole class to themselves. we're just vibing with functions here. πŸ’…


🌸 NAME 🌸

PkgConfig::LibPkgConf::Util β€” non-OO functions for PkgConfig::LibPkgConf. literally just a pile of handy utilities, no objects, no drama. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

use PkgConfig::LibPkgConf::Util qw( argv_split compare_version );

my @args = argv_split('-L/foo -lfoo'); # ('-L/foo', '-lfoo');
my $cmp  = compare_version('1.2.3','1.2.4');

look at her go. two imports, two calls, zero object orientation. iconic. ✨


πŸ’– DESCRIPTION πŸ’–

so this module is basically the friendship bracelet of the libpkgconf world: it hands you some genuinely useful utility functions that come along with libpkgconf, but they're not object oriented, so they don't get their own class. no constructor, no methods, no $self girlies. just functions, out here being free. 🫢


πŸ‘‘ FUNCTIONS πŸ‘‘

πŸ“ argv_split

my @argv = argv_split $args;

splits a string into an argument list. that's it, that's the function. string in, list of args out. slay. πŸ”₯

🌈 compare_version

my $cmp = compare_version($version1, $version2);

compares versions using RPM version comparison rules, as described in the LSB. and okay the return values are a little feral so listen up bestie:

  • returns -1 if the first version is greater
  • returns 0 if both versions are equal
  • returns 1 if the second version is greater
yes, you read that right. -1 means the first one is bigger. it's giving opposite-day energy, but that's the spec, periodt. πŸ’€

🧚 path_relocate

my $path = path_relocate($path);

relocates a path β€” and possibly calls realpath() or cygwin_conv_path() on it while it's at it. path in, relocated path out. lowkey doing the most, highkey doing it well. ✨

πŸŽ€ path_sep

my $sep = path_sep;

returns the path separator as understood by pkgconf. usually ":" on UNIX and ";" on Windows. no args, no fuss, just the separator your platform fw. πŸ¦‹


🫢 SUPPORT 🫢

need to holler at somebody? come through:

wanna contribute? bestie, open a pull request, we love that for you:


πŸ’œ SEE ALSO πŸ’œ

for additional related modules, go peek at PkgConfig::LibPkgConf. it's the main character, this page is the supporting cast. 🌟


🌸 AUTHOR 🌸

Graham Ollis

for additional contributors, see PkgConfig::LibPkgConf. πŸ’–


this software is copyright (c) 2016 Graham Ollis.

this is free software; you may redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. go forth and redistribute, queen. πŸ‘‘


and that's the whole page!! πŸŽ€ this was generated for perl v5.42.0, dated 2025-07-25, and it's the PkgConf...nf::Util(3) page β€” mwah, no notes, bye bestie πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from