UR::Env(3pm)
β¨ 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 everydie()into aCarp::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: everywarn()becomes aCarp::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 isUR::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 toSTDERRwhenever 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 toSTDERRwhenever 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 whenget()is called on a class, or while processing an iterator created throughSomeClass->create_iteratoranditerator->next(). if the value is1, then only queries about Non-UR classes are printed. if it's2, 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 toSTDERR. 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 toSTDERRas 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 withUR_DBI_MONITOR_SQL, it tells the data sources to also print messages toSTDERRfor 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 toSTDERRonly 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 withUR_DBI_EXPLAIN_SQL_MATCHandUR_DBI_EXPLAIN_SQL_SLOW, it prints a stack trace withCarp::longmess. same as"UR::DBI->explain_sql_callstack()"πUR_DBI_MONITOR_DML<bool> β likeUR_DBI_MONITOR_SQL, but it only prints information during data-altering statements, likeINSERT,UPDATEorDELETE. 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 duringUR::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 toSTDERRwith the contents of@INCjust before the program exits π¦UR_USED_MODSβ if true, prints a message toSTDERRwith the keys of%INCjust before the program exits. this will be a list of what modules had been loaded during the life of the program. and ifUR_USED_MODSis greater than1, 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
- debian bookworm: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libur-perl 0.470+ds-2 Β· 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