Alien::ROOT(3pm)
π Alien::ROOT π
okay bestie, so this is Alien::ROOT, a page from the User Contributed Perl Documentation collection, and it's literally a utility package for installing and locating CERN's ROOT library. yes the particle physics one. no you don't have to be a physicist, you just have to be a Perl girlie π§
β¨ NAME β¨
Alien::ROOT β the utility package that installs and finds CERN's ROOT library for you, no cap π
π SYNOPSIS π
look at how short this is. iconic. minimal. the way that it just works:
use Alien::ROOT;
my $aroot = Alien::ROOT->new;
that's it. that's the whole vibe check π¦
π DESCRIPTION π
So what does it do? It installs or detects CERN's ROOT library. That's the whole assignment and it ate.
This version of "Alien::ROOT" will download and install "ROOT v5.30.0" if necessary. And listen β if an existing (and compatible) installation of ROOT was detected, the module will not download/compile/install a new version of ROOT. she's considerate like that, she's not gonna redo work that's already done π
π METHODS π
okay this is the main character section, let's get into it π
πΈ Alien::ROOT->new
Creates a new "Alien::ROOT" object, which essentially just has a few convenience methods providing useful information like the path to the ROOT installation (the "ROOTSYS" environment variable) and the path to the root-config utility.
basically: a little object that knows things so you don't have to π«Ά
πΈ $aroot->installed
Determine if a valid installation of ROOT has been detected in the system. This method will return a true value if it is, or undef otherwise.
Example code:
print "okay\n" if $aroot->installed;
a yes/no girlie. we stan a binary queen β
πΈ $aroot->run
Sets up the ROOT environment (see "setup_environment") and then invokes the ROOT shell by simply calling "root".
so it does the env setup and drops you straight into the ROOT shell. one call, no extra steps, periodt β¨
πΈ $aroot->setup_environment
Sets up the "PATH" and "LD_LIBRARY_PATH" environment variables to point at the correct paths for ROOT.
β οΈ bestie listen β this throws an exception if ROOT was not found, so wrap this in an"eval"or check"$aroot->installed"before using this. do NOT just rawdog this call, i'm begging π
πΈ $aroot->version
Determine the installed version of ROOT, as a string.
Example code:
my $version = $aroot->version;
πΈ $aroot->ldflags / $aroot->linker_flags
This returns the flags required to link C code with the local installation of ROOT.
Example code:
my $ldflags = $aroot->ldflags;
(two names, same energy β ldflags and linker_flags are the same method, lowkey a two-for-one deal π)
πΈ $aroot->cflags / $aroot->compiler_flags
This method returns the compiler option flags to compile C++ code which uses the ROOT library (typically in the CFLAGS variable).
Example code:
my $cflags = $aroot->cflags;
again, cflags and compiler_flags β same method, two names, slay π
πΈ $aroot->features
This method returns a string of ROOT features that were enabled when ROOT was compiled.
Example code:
my $features = $aroot->features;
if ($features !~ /\bexplicitlink\b/) {
warn "ROOT was built without the --explicitlink option";
}
see how the example checks for explicitlink? that's the move, bestie π
πΈ $aroot->bindir
This method returns the path to the executable directory of ROOT.
Example code:
my $dir = $aroot->bindir;
system(File::Spec->catfile($dir, 'root'));
look at that File::Spec->catfile β she's portable AND pretty π
πΈ $aroot->libdir
This method returns the path to the library (lib/) directory of ROOT.
Example code:
my $dir = $aroot->libdir;
πΈ $aroot->incdir
This method returns the path to the include directory of ROOT.
Example code:
my $dir = $aroot->incdir;
πΈ $aroot->etcdir
This method returns the path to the 'etc' directory of ROOT.
Example code:
my $dir = $aroot->etcdir;
πΈ $aroot->private_root
This method returns true if the copy of ROOT that is being used was installed by "Alien::ROOT" and is considered private.
Example code:
my $is_private = $aroot->private_root;
π«Ά AUTHOR π«Ά
Steffen Mueller <smueller@cpan.org>
the og. the icon. the moment. π
π ACKNOWLEDGMENTS π
This package is based upon Jonathan Yu's Alien::libjio and Mattia Barbon's Alien::wxWidgets. They kindly allowed me to use their work as a starting point.
shoutout to the foundations, we love a humble build-on-the-shoulders-of-giants moment π₯Ή
π SUPPORT π
You can find documentation for this module with the perldoc command.
perldoc Alien::ROOT
You can also look for information at:
- Search CPAN
<http://search.cpan.org/dist/Alien-ROOT>
- CPAN Request Tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-ROOT>
- CPAN Testers Platform Compatibility Matrix
<http://cpantesters.org/show/Alien-ROOT.html>
like, everything you could possibly need is right there. go look, bestie π₯
π REPOSITORY π
You can access the most recent development version of this module at:
<git://github.com/tsee/ROOT.git>
fresh code, straight from the source, iykyk β
π¦ SEE ALSO π¦
SOOT, the Perl-ROOT wrapper.SOOT::App, the SOOT shell.Alien, the Alien manifesto.
the whole friend group fr fr π
π LICENSE π
This module is licensed under the GNU General Public License 2.0 or at your discretion, any newer version of the GPL. You can find a copy of the license in the LICENSE file of this package or at <http://www.opensource.org/licenses/gpl-2.0.php>
okay that's the whole page!! this was rendered for perl v5.42.0 on 2025-07-25 as part of Alien::ROOT(3pm) β go forth and link against ROOT, bestie, you've got this πβ¨π
π¦ where this page comes from
- fedora 43: perl-Alien-ROOT 5.34.36.1-36.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms