UR::Env(3pm)

πŸ“¦
version 0.470 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

✨ NAME ✨

UR::Env β€” bestie, this is the page of environment variables that control UR behavior, and it's giving backstage-pass energy πŸ’… (also, hi, this is the UR::Env(3pm) manual page, in case you were wondering where you landed 🫢)


🌈 DESCRIPTION 🌈

okay so here's the tea: UR reads a whole lil squad of environment variables to change how it behaves or to hand you extra debugging info when you're deep in the trenches πŸ”βœ¨

  • UR_STACK_DUMP_ON_DIE <bool> β€” when this is true, it literally turns every die() into a Carp::confess, which means a whole stack dump gets printed right after the die message. no cap, full receipts πŸ“œ
  • UR_STACK_DUMP_ON_WARN <bool> β€” when true, same deal but for warnings: every warn() becomes a Carp::cluck, so a stack dump prints after the warn message. it's giving "tell me everything" πŸ’€
  • UR_CONTEXT_ROOT <string> β€” the name of the Root context to instantiate when the program initializes. the default is UR::Context::DefaultRoot. you can use other Root Contexts too, like when you wanna connect to alternate databases while running in test mode πŸ§ͺ✨
  • UR_CONTEXT_BASE <string> β€” this value only changes in a sub-process which goes to its parent process for object I/O instead of the root (and the root is the default value for the base context in an application). so like, sub-process, know your place bestie πŸ‘‘
  • UR_CONTEXT_CACHE_SIZE_HIGHWATER <integer> β€” sets the object count highwater mark for the object cache pruner. see also "object_cache_size_highwater" in UR::Context 🌊
  • UR_CONTEXT_CACHE_SIZE_LOWWATER <integer> β€” sets the object count lowwater mark for the object cache pruner. see also "object_cache_size_lowwater" in UR::Context 🫧
  • UR_DEBUG_OBJECT_RELEASE <bool> β€” when true, messages get printed to STDERR whenever objects are removed from the object cache β€” like when the object pruner marks them for removal, when they get garbage collected, unloaded, or deleted. bye babes, we'll remember you 😭
  • UR_DEBUG_OBJECT_RELEASE <bool> β€” when true, messages get printed to STDERR whenever the object pruner finishes its work, and it shows how many objects of each class were marked for removal. yes bestie, same name, different intel β€” the manpage said it twice so we say it twice fr fr πŸ™ˆ
  • UR_CONTEXT_MONITOR_QUERY <integer> β€” when true (non-zero), messages print as the Context satisfies queries, like when get() is called on a class, or while processing an iterator created through SomeClass->create_iterator and iterator->next(). if the value is 1, then only queries about Non-UR classes are printed. if it's 2, then all queries' information is printed. pick your level of nosy, icon ✨
  • UR_DBI_MONITOR_SQL <bool> β€” if this is true, most interactions with data sources β€” connecting, disconnecting, querying β€” will print messages to STDERR. same as "UR::DBI->monitor_sql()". heads up though: this affects non-DBI data sources too, like file-based ones, which will render file I/O information instead of SQL πŸ‘€
  • UR_DBI_SUMMARIZE_SQL <bool> β€” if true, a report prints to STDERR as the program finishes, all about what SQL queries ran during the program's execution and how many times each one was executed. this is so helpful during optimization, it's giving personal trainer for your queries πŸ‹οΈβ™€οΈ
  • UR_DBI_MONITOR_EVERY_FETCH <bool> β€” used in conjunction with UR_DBI_MONITOR_SQL, it tells the data sources to also print messages to STDERR for each row fetched from the underlying data source. same as "UR::DBI->monitor_every_fetch()". every single row, we are watching πŸ‘οΈπŸ‘„πŸ‘οΈ
  • UR_DBI_DUMP_STACK_ON_CONNECT <bool> β€” prints a message to STDERR only when connecting to an underlying data source. same as "UR::DBI->dump_stack_on_connect()" πŸ”Œ
  • UR_DBI_EXPLAIN_SQL_MATCH <string> β€” if the query to a data source matches the given string (interpreted as a regex), then it will attempt to do an "explain plan" and print the results before executing the query. same as "UR::DBI->explain_sql_match()" πŸ”Ž
  • UR_DBI_EXPLAIN_SQL_SLOW <float> β€” if the time between a prepare and the first fetch of a query is longer than the given number of seconds, then it will do an "explain plan" and print the results. same as "UR::DBI->explain_sql_slow()". slow query? we're investigating πŸŒπŸ”
  • UR_DBI_EXPLAIN_SQL_CALLSTACK <bool> β€” used in conjunction with UR_DBI_EXPLAIN_SQL_MATCH and UR_DBI_EXPLAIN_SQL_SLOW, it prints a stack trace with Carp::longmess. same as "UR::DBI->explain_sql_callstack()" πŸ“š
  • UR_DBI_MONITOR_DML <bool> β€” like UR_DBI_MONITOR_SQL, but it only prints information during data-altering statements, like INSERT, UPDATE or DELETE. same as "UR::DBI->monitor_dml()" ✍️
  • UR_DBI_NO_COMMIT <bool> β€” if true, data source commits get ignored. but note that saving still occurs. if you're working with a RDBMS database, this means during UR::Context->commit(), the insert, update and delete SQL statements will be issued, but the changes will not be committed. useful for testing. same as "UR::DBI->no_commit()". (do not do this in prod, bestie, i'm serious 😭)
  • UR_USE_DUMMY_AUTOGENERATED_IDS <bool> β€” if true, objects created without ID params will use a special algorithm to generate IDs. objects with these special IDs will never be saved to a data source. useful during testing. same as "UR::DataSource->use_dummy_autogenerated_ids" 🎭
  • UR_USED_LIBS β€” if true, prints a message to STDERR with the contents of @INC just before the program exits πŸ“¦
  • UR_USED_MODS β€” if true, prints a message to STDERR with the keys of %INC just before the program exits. this will be a list of what modules had been loaded during the life of the program. and if UR_USED_MODS is greater than 1, then it will show the key/value pairs of %INC, which will show the path each module was loaded from πŸ—ΊοΈβœ¨

and that's the whole vibe check, bestie 🫢 this was UR::Env(3pm) from perl v5.32.1, dated 2022-01-17 β€” slay, go forth and set some env vars responsibly πŸ’–πŸŽ€

πŸ“¦ where this page comes from