Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Jifty::Util
Things that don't fit anywhere else

Jifty::Util - Things that don't fit anywhere else


NAME

Jifty::Util - Things that don't fit anywhere else


DESCRIPTION

absolute_path PATH

absolute_path converts PATH into an absolute path, relative to the application's root (as determined by app_root) This can be called as an object or class method.

canonicalize_path PATH

Takes a ``path'' style /foo/bar/baz and returns a canonicalized (but not necessarily absolute) version of the path. Always use / as the separator, even on platforms which recognizes both / and \ as valid separators in PATH.

jifty_root

Returns the root directory that Jifty has been installed into. Uses %INC to figure out where Jifty.pm is.

share_root

Returns the 'share' directory of the installed Jifty module. This is currently only used to store the common Mason components, CSS, and JS of Jifty and it's plugins.

app_root

Returns the application's root path. This is done by searching upward from the current directory, looking for a directory which contains a bin/jifty. Failing that, it searches upward from wherever the executable was found.

It dies if it can only find /usr or /usr/local which fit these criteria.

is_app_root PATH

Returns a boolean indicating whether the path passed in is the same path as the app root. Useful if you're recursing up a directory tree and want to stop when you've hit the root. It does not attempt to handle symbolic links.

default_app_name

Returns the default name of the application. This is the name of the application's root directory, as defined by app_root.

make_path PATH

When handed a directory, creates that directory, starting as far up the chain as necessary. (This is what 'mkdir -p' does in your shell).

require PATH

Uses the UNIVERSAL::require manpage to require the provided PATH. Additionally, logs any failures at the error log level.

try_to_require Module

This method works just like require, except that it surpresses the error message in cases where the module isn't found.

already_required class

Helper function to test whether a given class has already been require'd.

generate_uuid

Generate a new UUID using Data::UUID.


AUTHOR

Various folks at Best Practical Solutions, LLC.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy