Constructornew
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.
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 is found, then Expat is assumed to be
installed. Otherwise, most of the object methods will return "undef".
Events:
info
Searching for Expat libraries
confirm
Path to Expat library directory?
unknown
Path to Expat library directory?
ClassMethodkey_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".
ObjectMethodsinstalled
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".
version
Returns the full version number for Expat. App::Info::Lib::Expat attempts parse the version number from
the expat.h file, if it exists.
Events:
info
Searching for 'expat.h'
Searching for include directory
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".
Events:
info
Searching for 'expat.h'
Searching for include directory
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".
Events:
info
Searching for 'expat.h'
Searching for include directory
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".
Events:
info
Searching for 'expat.h'
Searching for include directory
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.
executable
my $executable = $expat->executable;
Since Expat includes no executable program, this method always returns false.
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.
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) -- 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.
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
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
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.
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