Ace::B...teDefs(3pm)

πŸ’– NAME πŸ’–

Ace::Browser::SiteDefs β€” your all-access pass to AceBrowser configuration files, bestie ✨


🌸 SYNOPSIS 🌸

use Ace;
use Ace::Browser::AceSubs;
use CGI qw(:standard);

my $configuration = Configuration;
my $docroot  = $configuration->Docroot;
my @pictures = @{$configuration->Pictures};
my %displays = %{$configuration->Displays};
my $coderef  = $configuration->Url_mapper;
$coderef->($param1,$param2);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so Ace::Browser::SiteDefs reads in an AceBrowser configuration file and hands you back a config object (that's the ✨ short ✨ name for "configuration object", and yes we're all gonna use it). Think of a config object as a little bag of methods that got generated on the fly, pulled straight out of whatever scalar variables, arrays, hashes and subroutines were chillin' in that configuration file. No cap.

Those methods are basically the configuration file's variables but canonicalized β€” which is a fancy way of saying the first character of the method name gets uppercased and everything after it goes lowercase. So if your config variable was $ROOT, the method you'd call is $config_object->Root. Iconic, honestly. πŸ’…

πŸŽ€ Working with Configuration Objects πŸŽ€

To snag a config object, use the Configuration() function from Ace::Browser::AceSubs. It gives you back a configuration object for the database you're currently on:

$config_object = Configuration();

After that? It's literally just a matter of making the right method calls, periodt. Here's the vibe check on what each kind of thing turns into:

  • A Scalar variable in the Configuration file β†’ the method call returns a Scalar
  • An Array variable β†’ the method call returns an Array reference
  • A Hash variable β†’ the method call returns a Hash reference
  • A Subroutine β†’ the method call returns a Code reference

And if a variable isn't defined at all? The corresponding method just returns undef. That's it, that's the whole deal. 🫢


πŸ’€ BUGS πŸ’€

Please report them. (Yeah, that's the whole section. Short king energy.) πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

Ace::Object, Ace::Browser::AceSubs, Ace::Browsr::SearchSubs, and the README.ACEBROWSER file β€” go read 'em, bestie. πŸ“š


🌈 AUTHOR 🌈

Lincoln Stein <lstein@cshl.org>.

Copyright (c) 2001 Cold Spring Harbor Laboratory

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.


πŸ’œ That's the whole page! This one's from perl v5.42.3, dated 2026-08-19, and it's a User Contributed Perl Documentation page for Ace::B...teDefs(3pm). Love that for us. Byeee! πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from