PkgConfig::LibPkgConf::Fragment(3) User Contributed Perl Documentation PkgConfig::LibPkgConf::Fragment(3)

PkgConfig::LibPkgConf::Fragment - Single compiler or linker flag

use PkgConfig::LibPkgConf::Client;

my $client = PkgConfig::LibPkgConf::Client->new;
$client->scan_all(sub {
  my($client, $package) = @_;
  # $package isa PkgConfig::LibPkgConf::Package
  foreach my $frag ($package->list_libs)
  {
    # $frag isa PkgConfig::LibPkgConf::Fragment
    if($frag->type eq 'L')
    {
      say "Library directory: ", $frag->data;
    }
    elsif($frag->type eq 'l')
    {
      say "Library name: ", $frag->data;
    }
  }
});

TODO

my $type = $frag->type;

The type of the flag. This may be "undef" if there is no type.

my $data = $frag->data;

The data for the fragment.

my $string = $frag->to_string;
my $string = "$frag";

The string representation of the fragment. You may also interpolate the fragment object inside a string to convert it into a string.

IRC #native on irc.perl.org

Project GitHub tracker:

https://github.com/plicease/PkgConfig-LibPkgConf/issues

If you want to contribute, please open a pull request on GitHub:

https://github.com/plicease/PkgConfig-LibPkgConf/pulls

For additional related modules, see PkgConfig::LibPkgConf

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.

2023-11-22 perl v5.38.0