App::I...::Expat(3pm)
๐ App::I...::Expat(3pm) โ yes bestie, that's the manual page name, it's a mouthful, we move ๐
okay so welcome to App::Info::Lib::Expat, aka the little Perl module that tells you everything about the Expat XML parser chillin' on your system. it's giving detective energy, fr fr. ๐ต๏ธโโ๏ธโจ
โจ NAME โจ
App::Info::Lib::Expat โ Information about the Expat XML parser ๐ธ
๐ฆ SYNOPSIS ๐ฆ
use App::Info::Lib::Expat;
my $expat = App::Info::Lib::Expat->new;
if ($expat->installed) {
print "App name: ", $expat->name, "\n";
print "Version: ", $expat->version, "\n";
print "Bin dir: ", $expat->bin_dir, "\n";
} else {
print "Expat is not installed. :-(\n";
}
look at that little if/else serving cuntry. ๐๐
๐ DESCRIPTION ๐
App::Info::Lib::Expat supplies info about the Expat XML parser installed on the local system. it implements all of the methods defined by App::Info::Lib. no skimping, no shortcuts. ๐
so here's the tea on events: methods that trigger events will trigger them only the first time they're called (see App::Info for documentation on handling events, iykyk). and if you wanna start over โ say, because someone finally installed Expat โ you just construct a new App::Info::Lib::Expat object to aggregate new meta data. fresh start, new you. ๐ฆ
some of the methods trigger the <em>same</em> events. why? because of cross-calling of shared subroutines. it's giving sibling energy. but like, rest assured bestie: any one event should be triggered no more than once. for example, even though the info event "Searching for 'expat.h'" is documented for the methods version(), major_version(), minor_version(), and patch_version(), it will only be triggered once โ by whichever of those four methods gets called first. the other three are just gonna sit there like "already handled ๐
".
๐ INTERFACE ๐
๐ Constructor ๐
new
my $expat = App::Info::Lib::Expat->new(@params);
Returns an App::Info::Lib::Expat object. see App::Info for a complete description of argument parameters. (go read it, it's worth it.)
when called, new() searches all of the paths returned by the search_lib_dirs() method for one of the files returned by the search_lib_names() method. if any of them is found, then Expat is assumed to be installed. otherwise, most of the object methods will return undef. sad girl hours. ๐ญ
Events:
- info โ Searching for Expat libraries ๐
- confirm โ Path to Expat library directory?
- unknown โ Path to Expat library directory?
๐ Class Method ๐
key_name
my $key_name = App::Info::Lib::Expat->key_name;
Returns the unique key name that describes this class. the value returned is the string "Expat". iconic, honestly.
๐ง Object Methods ๐ง
installed
print "Expat is ", ($expat->installed ? '' : 'not '),
"installed.\n";
Returns true if Expat is installed, and false if it is not. App::Info::Lib::Expat determines whether Expat is installed based on the presence or absence on the file system of one of the files searched for when new() constructed the object. if Expat does not appear to be installed, then most of the other object methods will return empty values. ๐
name
my $name = $expat->name;
Returns the name of the application. in this case, name() simply returns the string "Expat". no plot twist, that's just the name. โจ
version
Returns the full version number for Expat. App::Info::Lib::Expat attempts to parse the version number from the expat.h file, if it exists.
Events:
- info
- Searching for
'expat.h' - Searching for include directory
- Searching for
- error
- Cannot find include directory
- Cannot find
'expat.h' - Failed to parse version from
'expat.h'
- unknown
- Enter a valid Expat include directory
- Enter a valid Expat version number
major_version
my $major_version = $expat->major_version;
Returns the Expat major version number. App::Info::Lib::Expat attempts to parse the version number from the expat.h file, if it exists. for example, if version() returns "1.95.2", then this method returns "1". math is mathing. ๐งฎ
Events:
- info
- Searching for
'expat.h' - Searching for include directory
- Searching for
- error
- Cannot find include directory
- Cannot find
'expat.h' - Failed to parse version from
'expat.h'
- unknown
- Enter a valid Expat include directory
- Enter a valid Expat major version number
minor_version
my $minor_version = $expat->minor_version;
Returns the Expat minor version number. App::Info::Lib::Expat attempts to parse the version number from the expat.h file, if it exists. for example, if version() returns "1.95.2", then this method returns "95". mid number but ok. ๐
Events:
- info
- Searching for
'expat.h' - Searching for include directory
- Searching for
- error
- Cannot find include directory
- Cannot find
'expat.h' - Failed to parse version from
'expat.h'
- unknown
- Enter a valid Expat include directory
- Enter a valid Expat minor version number
patch_version
my $patch_version = $expat->patch_version;
Returns the Expat patch version number. App::Info::Lib::Expat attempts to parse the version number from the expat.h file, if it exists. for example, version() returns "1.95.2", then this method returns "2". the final girl of the version number. ๐
Events:
- info
- Searching for
'expat.h' - Searching for include directory
- Searching for
- error
- Cannot find include directory
- Cannot find
'expat.h' - Failed to parse version from
'expat.h'
- unknown
- Enter a valid Expat include directory
- Enter a valid Expat patch version number
bin_dir
my $bin_dir = $expat->bin_dir;
Since Expat includes no binaries, this method always returns false. it's giving empty pockets bestie, don't ask her for anything. ๐ซ
executable
my $executable = $expat->executable;
Since Expat includes no executable program, this method always returns false. same energy, different method. ๐
inc_dir
my $inc_dir = $expat->inc_dir;
Returns the directory path in which the file expat.h was found. App::Info::Lib::Expat searches for expat.h in the following directories:
/usr/local/include
/usr/include
/sw/include
Events:
- info
- Searching for include directory
- error
- Cannot find include directory
- unknown
- Enter a valid Expat include directory
lib_dir
my $lib_dir = $expat->lib_dir;
Returns the directory path in which a Expat library was found. the files and paths searched are as described for the new constructor, as are the events. (copy-paste queen, but make it intentional. ๐
)
so_lib_dir
my $so_lib_dir = $expat->so_lib_dir;
Returns the directory path in which a Expat shared object library was found. it searches all of the paths in the libsdirs and loclibpth attributes defined by the Perl Config module โ plus /sw/lib (for all you Fink fans out there ๐ซถ) โ for one of the following files:
libexpat.so
libexpat.so.0
libexpat.so.0.0.1
libexpat.dylib
libexpat.0.dylib
libexpat.0.0.1.dylib
Events:
- info
- Searching for shared object library directory
- error
- Cannot find shared object library directory
- unknown
- Enter a valid Expat shared object library directory
home_url
my $home_url = $expat->home_url;
Returns the libexpat home page URL. ๐
download_url
my $download_url = $expat->download_url;
Returns the libexpat download URL. get you that tarball bestie. ๐ฆ
search_lib_names
my @seach_lib_names = $self->search_lib_nams
Returns a list of possible names for library files. used by lib_dir() to search for library files. by default, the list is:
libexpat.a
libexpat.la
libexpat.so
libexpat.so.0
libexpat.so.0.0.1
libexpat.dylib
libexpat.0.dylib
libexpat.0.0.1.dylib
yes, the variable in that example is spelled@seach_lib_namesand the method call is spelledsearch_lib_nams. not me fixing the typo. ๐ i am NOT touching it, that's the original and we respect her. periodt.
search_so_lib_names
my @seach_so_lib_names = $self->search_so_lib_nams
Returns a list of possible names for shared object library files. used by so_lib_dir() to search for library files. by default, the list is:
libexpat.so
libexpat.so.0
libexpat.so.0.0.1
libexpat.dylib
libexpat.0.dylib
libexpat.0.0.1.dylib
same deal,@seach_so_lib_namesandsearch_so_lib_namsare exactly as written. no cap, i'm not editing them. ๐
search_lib_dirs
my @search_lib_dirs = $expat->search_lib_dirs;
Returns a list of possible directories in which to search for libraries. by default, it returns all of the paths in the libsdirs and loclibpth attributes defined by the Perl Config module โ plus /sw/lib (in support of all you Fink users out there). ๐ซถ
search_inc_names
my @search_inc_names = $expat->search_inc_names;
Returns a list of include file names to search for. used by inc_dir() to search for an include file. by default, the only name returned is expat.h. one and done. โจ
search_inc_dirs
my @search_inc_dirs = $expat->search_inc_dirs;
Returns a list of possible directories in which to search for include files. used by inc_dir() to search for an include file. by default, the directories are:
/usr/local/include
/usr/include
/sw/include
๐ญ KNOWN ISSUES ๐ญ
this is a pretty simple class. it's possible that there are more directories that ought to be searched for libraries and includes. and if anyone knows how to get the version numbers, let me know! ๐โโ๏ธ
the format of the version number seems to have changed recently (1.95.1-2), and now i don't know where to find the version number. Patches welcome. pls bestie, we're begging. ๐ฅบ
๐ซถ SUPPORT ๐ซถ
this module is stored in an open GitHub repository <http://github.com/theory/app-info/>. feel free to fork and contribute! go off, main character. ๐
please file bug reports via GitHub Issues <http://github.com/theory/app-info/issues/> or by sending mail to bug-App-Info@rt.cpan.org <mailto:bug-App-Info@rt.cpan.org>.
๐ธ AUTHOR ๐ธ
David E. Wheeler <david@justatheory.com> based on code by Sam Tregar <sam@tregar.com> that Sam, in turn, borrowed from Clark Cooper's XML::Parser module. the lineage?? impeccable. family tree ate. ๐ณโจ
โญ SEE ALSO โญ
App::Infodocuments the event handling interface.App::Info::Libis theApp::Info::Lib::Expatparent class.XML::Parseruses Expat to parse XML.Configprovides Perl configure-time information used byApp::Info::Lib::Expatto locate Expat libraries and files.- <http://expat.sourceforge.net/> is the Expat home page.
๐ COPYRIGHT AND LICENSE ๐
Copyright (c) 2002-2011, David E. Wheeler. Some Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page bestie!! ๐๐๐ฆ this lil manual page came from the User Contributed Perl Documentation, it's perl v5.36.0, dated 2022-12-06, and the page title is App::I...::Expat(3pm) โ yes that ellipsis is doing a lot of heavy lifting but she's iconic for it. mwah, go read some expat.h and slay. ๐โจ๐
๐ฆ where this page comes from
- debian bookworm: libapp-info-perl 0.57-4 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libapp-info-perl 0.57-4 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libapp-info-perl 0.57-4 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libapp-info-perl 0.57-4 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libapp-info-perl 0.57-4 ยท 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