App::I...SQLite(3pm)
π App::Info::RDBMS::SQLite π
okay so this is the App::Info::RDBMS::SQLite(3pm) page, from the User Contributed Perl Documentation corner of the internet. It's giving "I know everything about your SQLite install and I'm not sorry". Buckle up bestie, it's a long one. π¦
πΈ NAME πΈ
App::Info::RDBMS::SQLite β information about SQLite. That's the whole assignment. β¨
π SYNOPSIS π
use App::Info::RDBMS::SQLite;
my $sqlite = App::Info::RDBMS::SQLite->new;
if ($sqlite->installed) {
print "App name: ", $sqlite->name, "\n";
print "Version: ", $sqlite->version, "\n";
print "Bin dir: ", $sqlite->bin_dir, "\n";
} else {
print "SQLite is not installed. :-(\n";
}
no cap, that's the whole flow. Make the object, vibe check it, print the receipts. π
π DESCRIPTION π
App::Info::RDBMS::SQLite hands you all the tea about the SQLite application living on your local system. It implements all of the methods that App::Info::RDBMS defines β every single one, we're thorough here. π
Important behavior note: methods that trigger events will trigger them only the first time they're called. (Peep App::Info for the whole story on handling events.) So if you wanna start over β say, because someone finally installed SQLite β you gotta construct a brand new App::Info::RDBMS::SQLite object to aggregate fresh meta data. No recycling, bestie. ποΈβ¨
Some methods trigger the same events, and that's just because of cross-calling of shared subroutines. It's giving messy but in a cute way. Anyway β any one event should be triggered no more than once. Example time: even though the info event "Executing `pg_config --version`" is documented for the methods name(), version(), major_version(), minor_version(), and patch_version(), rest assured it will only be triggered once, by whichever of those four methods gets called first. Yes we said five methods and then said four. That's what the original says. We don't make the rules. π
β¨ INTERFACE β¨
π¦ Constructor π¦
new
my $sqlite = App::Info::RDBMS::SQLite->new(@params);
Returns an App::Info::RDBMS::SQLite object. π Peep App::Info for a complete description of argument parameters.
When it's called, new() goes snooping through the directories returned by search_bin_dirs looking for an executable with a name returned by search_exe_names. If it finds one? Slay. It gets called by the object methods below to gather up all the data each one needs. If it can't find one, then new() will attempt to load DBD::SQLite or DBD::SQLite2. Those DBI drivers have SQLite embedded in them but do not install the application β important distinction, iykyk. And if those fail too? Then SQLite is assumed to not be installed at all, and every one of the object methods will return undef. oof. π
Events:
infoβ Looking for SQLite.confirmβ Path to SQLite executable?unknownβ Path to SQLite executable?
π Class Method π
key_name
my $key_name = App::Info::RDBMS::SQLite->key_name;
Returns the unique key name that describes this class. The value returned is the string "SQLite". One word, iconic, no notes. π
π Object Methods π
installed
print "SQLite is ", ($sqlite->installed ? '' : 'not '), "installed.\n";
Returns true if SQLite is installed, and false if it is not.
App::Info::RDBMS::SQLite determines whether SQLite is installed based on the presence or absence of the sqlite3 or sqlite application on the file system as found back when new() constructed the object. If SQLite does not appear to be installed, then all of the other object methods will return empty values. It's a whole vibe shift, fr fr. π«Ά
name
my $name = $sqlite->name;
Returns the name of the application. App::Info::RDBMS::SQLite simply returns the value returned by key_name if SQLite is installed, and undef if it is not installed. Short, sweet, no drama. πΈ
version
my $version = $sqlite->version;
Returns the SQLite version number. App::Info::RDBMS::SQLite parses the version number from the system call `sqlite -version` or retrieves it from DBD::SQLite. Two roads, one destination. π£οΈ
Events:
infoβ Executingsqlite -versionerror- Failed to find SQLite version with
sqlite -version - Failed to retrieve SQLite version from
DBD::SQLite - Unable to parse name from string
- Unable to parse version from string
- Failed to parse SQLite version parts from string
- Failed to find SQLite version with
unknownβ Enter a valid SQLite version number
major version
my $major_version = $sqlite->major_version;
Returns the SQLite major version number. App::Info::RDBMS::SQLite parses the version number from the system call `sqlite -version` or retrieves it from DBD::SQLite. For example, if version() returns 3.0.8, then this method returns 3. See how that works? First number, that's the one. π’
Events:
infoβ Executingsqlite -versionerror- Failed to find SQLite version with
sqlite -version - Failed to retrieve SQLite version from
DBD::SQLite - Unable to parse name from string
- Unable to parse version from string
- Failed to parse SQLite version parts from string
- Failed to find SQLite version with
unknownβ Enter a valid SQLite version number
minor version
my $minor_version = $sqlite->minor_version;
Returns the SQLite minor version number. App::Info::RDBMS::SQLite parses the version number from the system call `sqlite -version` or retrieves it from DBD::SQLite. For example, if version() returns 3.0.8, then this method returns 0. Middle child number. π₯
Events:
infoβ Executingsqlite -versionerror- Failed to find SQLite version with
sqlite -version - Failed to retrieve SQLite version from
DBD::SQLite - Unable to parse name from string
- Unable to parse version from string
- Failed to parse SQLite version parts from string
- Failed to find SQLite version with
unknownβ Enter a valid SQLite version number
patch version
my $patch_version = $sqlite->patch_version;
Returns the SQLite patch version number. App::Info::RDBMS::SQLite parses the version number from the system call `sqlite -version` or retrieves it from DBD::SQLite. For example, if version() returns 3.0.8, then this method returns 8. The lil guy at the end. π
Events:
infoβ Executingsqlite -versionerror- Failed to find SQLite version with
sqlite -version - Failed to retrieve SQLite version from
DBD::SQLite - Unable to parse name from string
- Unable to parse version from string
- Failed to parse SQLite version parts from string
- Failed to find SQLite version with
unknownβ Enter a valid SQLite version number
executable
my $executable = $sqlite->executable;
Returns the path to the SQLite executable β usually sqlite3 or sqlite β which will be defined by one of the names returned bysearch_exe_names(). (Yes, the spacing is a little cursed there. We're keeping it. π) The executable gets searched for in new(), so there are no events for this method. Chill one. π
bin_dir
my $bin_dir = $sqlite->bin_dir;
Returns the SQLite binary directory path. App::Info::RDBMS::SQLite simply retrieves it as the directory part of the path to the SQLite executable. It's giving "the folder part of the path". π
lib_dir
my $lib_dir = $expat->lib_dir;
Returns the directory path in which an SQLite library was found. That directory path will be one of the values returned by search_lib_dirs(), where a file with a name as returned by search_lib_names() was found. No search is performed if SQLite is not installed or if only DBD::SQLite is installed. Don't waste the effort, bestie. π«
Events:
infoβ Searching for shared object library directoryerrorβ Cannot find shared object library directoryunknownβ Enter a valid Expat shared object library directory
so_lib_dir
my $so_lib_dir = $expat->so_lib_dir;
Returns the directory path in which an SQLite shared object library was found. That directory path will be one of the values returned by search_lib_dirs(), where a file with a name as returned by search_so_lib_names() was found. Same deal as before: no search is performed if SQLite is not installed or if only DBD::SQLite is installed. π¦
Events:
infoβ Searching for shared object library directoryerrorβ Cannot find shared object library directoryunknownβ Enter a valid Expat shared object library directory
inc_dir
my $inc_dir = $sqlite->inc_dir;
Returns the directory path in which an SQLite include file was found. That directory path will be one of the values returned by search_inc_dirs(), where a file with a name as returned by search_inc_names() was found. And again, for the people in the back: no search is performed if SQLite is not installed or if only DBD::SQLite is installed. π
Events:
infoβ Searching for include directoryerrorβ Cannot find include directoryunknownβ Enter a valid SQLite include directory
home_url
my $home_url = $pg->home_url;
Returns the PostgreSQL home page URL. (Yes. PostgreSQL. On the SQLite page. We are simply reporting what the original says, we do not ask questions. π) π
download_url
my $download_url = $pg->download_url;
Returns the PostgreSQL download URL. Again: PostgreSQL, on the SQLite page. The lore is the lore. π₯
search_exe_names
my @search_exe_names = $sqlite->search_exe_names;
Returns a list of possible names for the SQLite executable. The names are sqlite3 and sqlite by default (sqlite3.exe and sqlite.exe on Win32). Windows girlies get the .exe, as they should. πͺβ¨
search_bin_dirs
my @search_bin_dirs = $sqlite->search_bin_dirs;
Returns a list of possible directories in which to search an executable. Used by the new() constructor to find an executable to execute and collect application info from. The found directory will also be returned by the bin_dir method. Two birds, one method. π¦π¦
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:
libsqlite3.a
libsqlite3.la
libsqlite3.so
libsqlite3.so.0
libsqlite3.so.0.0.1
libsqlite3.dylib
libsqlite3.0.dylib
libsqlite3.0.0.1.dylib
libsqlite.a
libsqlite.la
libsqlite.so
libsqlite.so.0
libsqlite.so.0.0.1
libsqlite.dylib
libsqlite.0.dylib
libsqlite.0.0.1.dylib
Sixteen of them. We counted. We're not okay but we did it. π
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:
libsqlite3.so
libsqlite3.so.0
libsqlite3.so.0.0.1
libsqlite3.dylib
libsqlite3.0.dylib
libsqlite3.0.0.1.dylib
libsqlite.so
libsqlite.so.0
libsqlite.so.0.0.1
libsqlite.dylib
libsqlite.0.dylib
libsqlite.0.0.1.dylib
Same energy, .so/.dylib edition. π
search_lib_dirs
my @search_lib_dirs = $sqlite->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). We see you, Fink girlies. π«Ά
search_inc_names
my @search_inc_names = $sqlite->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 names are sqlite3.h and sqlite.h. Just the two. Balanced. π
search_inc_dirs
my @search_inc_dirs = $sqlite->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
Three directories, zero surprises. β¨
π«Ά SUPPORT π«Ά
okay so this module lives in a fully open GitHub repo at http://github.com/theory/app-info/ β like, it's right there, bestie. fork it, poke at it, send a contribution, the whole vibe is "come hang out and help" π
Found a bug? π Don't suffer in silence, file it! Two ways to do the thing:
- GitHub Issues at
http://github.com/theory/app-info/issues/β the β¨modernβ¨ route - or send mail to
bug-App-Info@rt.cpan.orgβ old school but iconic
Either one, fr fr, just tell them.
π AUTHOR π
David E. Wheeler <david@justatheory.com> β the main character who wrote all this. π
π¦ SEE ALSO π¦
the extended universe, if you will:
- App::Info β this is where the event handling interface gets documented. go read it, iykyk.
- App::Info::RDBMS β the parent class that
App::Info::RDBMS::SQLiteinherits from. like, the family tree is giving lineage. πΈ - DBD::SQLite β the DBI driver for connecting to SQLite databases. that's the plug, no cap. π
http://www.sqlite.org/β the SQLite home page itself. the mothership. πΈ
π COPYRIGHT AND LICENSE π
Copyright (c) 2004-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. periodt. π
so that's the whole page, bestie! π
this gem came to you courtesy of perl v5.36.0, dated 2022-12-06, and the page itself is App::I...SQLite(3pm) π¦ β go forth and install some SQLite, you absolute icon πβ¨
π¦ 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