Alien::ROOT(3pm)

πŸ“¦
version 5.34.36.1 Β· 2 versions
, in fedora 43

πŸ’– 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