.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "App::Info::Lib::Expat 3pm" .TH App::Info::Lib::Expat 3pm "2020-01-23" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" App::Info::Lib::Expat \- Information about the Expat XML parser .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use App::Info::Lib::Expat; \& \& my $expat = App::Info::Lib::Expat\->new; \& \& if ($expat\->installed) { \& print "App name: ", $expat\->name, "\en"; \& print "Version: ", $expat\->version, "\en"; \& print "Bin dir: ", $expat\->bin_dir, "\en"; \& } else { \& print "Expat is not installed. :\-(\en"; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" App::Info::Lib::Expat supplies information about the Expat \s-1XML\s0 parser installed on the local system. It implements all of the methods defined by App::Info::Lib. Methods that trigger events will trigger them only the first time they're called (See App::Info for documentation on handling events). To start over (after, say, someone has installed Expat) construct a new App::Info::Lib::Expat object to aggregate new meta data. .PP Some of the methods trigger the same events. This is due to cross-calling of shared subroutines. However, any one event should be triggered no more than once. For example, although the info event \*(L"Searching for 'expat.h'\*(R" is documented for the methods \f(CW\*(C`version()\*(C'\fR, \f(CW\*(C`major_version()\*(C'\fR, \&\f(CW\*(C`minor_version()\*(C'\fR, and \f(CW\*(C`patch_version()\*(C'\fR, rest assured that it will only be triggered once, by whichever of those four methods is called first. .SH "INTERFACE" .IX Header "INTERFACE" .SS "Constructor" .IX Subsection "Constructor" \fInew\fR .IX Subsection "new" .PP .Vb 1 \& my $expat = App::Info::Lib::Expat\->new(@params); .Ve .PP Returns an App::Info::Lib::Expat object. See App::Info for a complete description of argument parameters. .PP When called, \f(CW\*(C`new()\*(C'\fR searches all of the paths returned by the \&\f(CW\*(C`search_lib_dirs()\*(C'\fR method for one of the files returned by the \&\f(CW\*(C`search_lib_names()\*(C'\fR method. If any of is found, then Expat is assumed to be installed. Otherwise, most of the object methods will return \f(CW\*(C`undef\*(C'\fR. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for Expat libraries .IP "confirm" 4 .IX Item "confirm" Path to Expat library directory? .IP "unknown" 4 .IX Item "unknown" Path to Expat library directory? .SS "Class Method" .IX Subsection "Class Method" \fIkey_name\fR .IX Subsection "key_name" .PP .Vb 1 \& my $key_name = App::Info::Lib::Expat\->key_name; .Ve .PP Returns the unique key name that describes this class. The value returned is the string \*(L"Expat\*(R". .SS "Object Methods" .IX Subsection "Object Methods" \fIinstalled\fR .IX Subsection "installed" .PP .Vb 2 \& print "Expat is ", ($expat\->installed ? \*(Aq\*(Aq : \*(Aqnot \*(Aq), \& "installed.\en"; .Ve .PP 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 \&\f(CW\*(C`new()\*(C'\fR constructed the object. If Expat does not appear to be installed, then most of the other object methods will return empty values. .PP \fIname\fR .IX Subsection "name" .PP .Vb 1 \& my $name = $expat\->name; .Ve .PP Returns the name of the application. In this case, \f(CW\*(C`name()\*(C'\fR simply returns the string \*(L"Expat\*(R". .PP \fIversion\fR .IX Subsection "version" .PP Returns the full version number for Expat. App::Info::Lib::Expat attempts parse the version number from the \fIexpat.h\fR file, if it exists. .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for 'expat.h' .Sp Searching for include directory .IP "error" 4 .IX Item "error" Cannot find include directory .Sp Cannot find 'expat.h' .Sp Failed to parse version from 'expat.h' .IP "unknown" 4 .IX Item "unknown" Enter a valid Expat include directory .Sp Enter a valid Expat version number .PP \fImajor_version\fR .IX Subsection "major_version" .PP .Vb 1 \& my $major_version = $expat\->major_version; .Ve .PP Returns the Expat major version number. App::Info::Lib::Expat attempts to parse the version number from the \fIexpat.h\fR file, if it exists. For example, if \f(CW\*(C`version()\*(C'\fR returns \*(L"1.95.2\*(R", then this method returns \*(L"1\*(R". .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for 'expat.h' .Sp Searching for include directory .IP "error" 4 .IX Item "error" Cannot find include directory .Sp Cannot find 'expat.h' .Sp Failed to parse version from 'expat.h' .IP "unknown" 4 .IX Item "unknown" Enter a valid Expat include directory .Sp Enter a valid Expat major version number .PP \fIminor_version\fR .IX Subsection "minor_version" .PP .Vb 1 \& my $minor_version = $expat\->minor_version; .Ve .PP Returns the Expat minor version number. App::Info::Lib::Expat attempts to parse the version number from the \fIexpat.h\fR file, if it exists. For example, if \f(CW\*(C`version()\*(C'\fR returns \*(L"1.95.2\*(R", then this method returns \*(L"95\*(R". .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for 'expat.h' .Sp Searching for include directory .IP "error" 4 .IX Item "error" Cannot find include directory .Sp Cannot find 'expat.h' .Sp Failed to parse version from 'expat.h' .IP "unknown" 4 .IX Item "unknown" Enter a valid Expat include directory .Sp Enter a valid Expat minor version number .PP \fIpatch_version\fR .IX Subsection "patch_version" .PP .Vb 1 \& my $patch_version = $expat\->patch_version; .Ve .PP Returns the Expat patch version number. App::Info::Lib::Expat attempts to parse the version number from the \fIexpat.h\fR file, if it exists. For example, \&\f(CW\*(C`version()\*(C'\fR returns \*(L"1.95.2\*(R", then this method returns \*(L"2\*(R". .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for 'expat.h' .Sp Searching for include directory .IP "error" 4 .IX Item "error" Cannot find include directory .Sp Cannot find 'expat.h' .Sp Failed to parse version from 'expat.h' .IP "unknown" 4 .IX Item "unknown" Enter a valid Expat include directory .Sp Enter a valid Expat patch version number .PP \fIbin_dir\fR .IX Subsection "bin_dir" .PP .Vb 1 \& my $bin_dir = $expat\->bin_dir; .Ve .PP Since Expat includes no binaries, this method always returns false. .PP \fIexecutable\fR .IX Subsection "executable" .PP .Vb 1 \& my $executable = $expat\->executable; .Ve .PP Since Expat includes no executable program, this method always returns false. .PP \fIinc_dir\fR .IX Subsection "inc_dir" .PP .Vb 1 \& my $inc_dir = $expat\->inc_dir; .Ve .PP Returns the directory path in which the file \fIexpat.h\fR was found. App::Info::Lib::Expat searches for \fIexpat.h\fR in the following directories: .IP "/usr/local/include" 4 .IX Item "/usr/local/include" .PD 0 .IP "/usr/include" 4 .IX Item "/usr/include" .IP "/sw/include" 4 .IX Item "/sw/include" .PD .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for include directory .IP "error" 4 .IX Item "error" Cannot find include directory .IP "unknown" 4 .IX Item "unknown" Enter a valid Expat include directory .PP \fIlib_dir\fR .IX Subsection "lib_dir" .PP .Vb 1 \& my $lib_dir = $expat\->lib_dir; .Ve .PP Returns the directory path in which a Expat library was found. The files and paths searched are as described for the \*(L"new\*(R" constructor, as are the events. .PP \fIso_lib_dir\fR .IX Subsection "so_lib_dir" .PP .Vb 1 \& my $so_lib_dir = $expat\->so_lib_dir; .Ve .PP Returns the directory path in which a Expat shared object library was found. It searches all of the paths in the \f(CW\*(C`libsdirs\*(C'\fR and \f(CW\*(C`loclibpth\*(C'\fR attributes defined by the Perl Config module \*(-- plus \fI/sw/lib\fR (for all you Fink fans) \*(-- for one of the following files: .IP "libexpat.so" 4 .IX Item "libexpat.so" .PD 0 .IP "libexpat.so.0" 4 .IX Item "libexpat.so.0" .IP "libexpat.so.0.0.1" 4 .IX Item "libexpat.so.0.0.1" .IP "libexpat.dylib" 4 .IX Item "libexpat.dylib" .IP "libexpat.0.dylib" 4 .IX Item "libexpat.0.dylib" .IP "libexpat.0.0.1.dylib" 4 .IX Item "libexpat.0.0.1.dylib" .PD .PP \&\fBEvents:\fR .IP "info" 4 .IX Item "info" Searching for shared object library directory .IP "error" 4 .IX Item "error" Cannot find shared object library directory .IP "unknown" 4 .IX Item "unknown" Enter a valid Expat shared object library directory .PP \fIhome_url\fR .IX Subsection "home_url" .PP .Vb 1 \& my $home_url = $expat\->home_url; .Ve .PP Returns the libexpat home page \s-1URL.\s0 .PP \fIdownload_url\fR .IX Subsection "download_url" .PP .Vb 1 \& my $download_url = $expat\->download_url; .Ve .PP Returns the libexpat download \s-1URL.\s0 .PP \fIsearch_lib_names\fR .IX Subsection "search_lib_names" .PP .Vb 1 \& my @seach_lib_names = $self\->search_lib_nams .Ve .PP Returns a list of possible names for library files. Used by \f(CW\*(C`lib_dir()\*(C'\fR to search for library files. By default, the list is: .IP "libexpat.a" 4 .IX Item "libexpat.a" .PD 0 .IP "libexpat.la" 4 .IX Item "libexpat.la" .IP "libexpat.so" 4 .IX Item "libexpat.so" .IP "libexpat.so.0" 4 .IX Item "libexpat.so.0" .IP "libexpat.so.0.0.1" 4 .IX Item "libexpat.so.0.0.1" .IP "libexpat.dylib" 4 .IX Item "libexpat.dylib" .IP "libexpat.0.dylib" 4 .IX Item "libexpat.0.dylib" .IP "libexpat.0.0.1.dylib" 4 .IX Item "libexpat.0.0.1.dylib" .PD .PP \fIsearch_so_lib_names\fR .IX Subsection "search_so_lib_names" .PP .Vb 1 \& my @seach_so_lib_names = $self\->search_so_lib_nams .Ve .PP Returns a list of possible names for shared object library files. Used by \&\f(CW\*(C`so_lib_dir()\*(C'\fR to search for library files. By default, the list is: .IP "libexpat.so" 4 .IX Item "libexpat.so" .PD 0 .IP "libexpat.so.0" 4 .IX Item "libexpat.so.0" .IP "libexpat.so.0.0.1" 4 .IX Item "libexpat.so.0.0.1" .IP "libexpat.dylib" 4 .IX Item "libexpat.dylib" .IP "libexpat.0.dylib" 4 .IX Item "libexpat.0.dylib" .IP "libexpat.0.0.1.dylib" 4 .IX Item "libexpat.0.0.1.dylib" .PD .PP \fIsearch_lib_dirs\fR .IX Subsection "search_lib_dirs" .PP .Vb 1 \& my @search_lib_dirs = $expat\->search_lib_dirs; .Ve .PP Returns a list of possible directories in which to search for libraries. By default, it returns all of the paths in the \f(CW\*(C`libsdirs\*(C'\fR and \f(CW\*(C`loclibpth\*(C'\fR attributes defined by the Perl Config module \*(-- plus \fI/sw/lib\fR (in support of all you Fink users out there). .PP \fIsearch_inc_names\fR .IX Subsection "search_inc_names" .PP .Vb 1 \& my @search_inc_names = $expat\->search_inc_names; .Ve .PP Returns a list of include file names to search for. Used by \f(CW\*(C`inc_dir()\*(C'\fR to search for an include file. By default, the only name returned is \fIexpat.h\fR. .PP \fIsearch_inc_dirs\fR .IX Subsection "search_inc_dirs" .PP .Vb 1 \& my @search_inc_dirs = $expat\->search_inc_dirs; .Ve .PP Returns a list of possible directories in which to search for include files. Used by \f(CW\*(C`inc_dir()\*(C'\fR to search for an include file. By default, the directories are: .IP "/usr/local/include" 4 .IX Item "/usr/local/include" .PD 0 .IP "/usr/include" 4 .IX Item "/usr/include" .IP "/sw/include" 4 .IX Item "/sw/include" .PD .SH "KNOWN ISSUES" .IX Header "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! .PP 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. .SH "SUPPORT" .IX Header "SUPPORT" This module is stored in an open GitHub repository . Feel free to fork and contribute! .PP Please file bug reports via GitHub Issues or by sending mail to bug\-App\-Info@rt.cpan.org . .SH "AUTHOR" .IX Header "AUTHOR" David E. Wheeler based on code by Sam Tregar that Sam, in turn, borrowed from Clark Cooper's XML::Parser module. .SH "SEE ALSO" .IX Header "SEE ALSO" App::Info documents the event handling interface. .PP App::Info::Lib is the App::Info::Lib::Expat parent class. .PP XML::Parser uses Expat to parse \s-1XML.\s0 .PP Config provides Perl configure-time information used by App::Info::Lib::Expat to locate Expat libraries and files. .PP is the Expat home page. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (c) 2002\-2011, David E. Wheeler. Some Rights Reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.