Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gimp::data(3) [redhat man page]

Data(3) 						User Contributed Perl Documentation						   Data(3)

NAME
Gimp::Data - Set and get state data. SYNOPSIS
use Gimp::Data; $Gimp::Data{'value1'} = "Hello"; print $Gimp::Data{'value1'},", World!! "; DESCRIPTION
With this module, you can access plugin-specific (or global) data in Gimp, i.e. you can store and retrieve values that are stored in the main Gimp application. An example would be to save parameter values in Gimp, so that on subsequent invocations of your plug-in, the user does not have to set all parameter values again (Gimp::Fu does this already). %Gimp::Data You can store and retrieve anything you like in this hash. It's contents will automatically be stored in Gimp, and can be accessed in later invocations of your plug-in. Be aware that other plug-ins store data in the same "hash", so better prefix your key with something unique, like your plug-in's name. As an example, the Gimp::Fu module uses "function_name/_fu_data" to store its data. This module might use a persistant implementation, i.e. your data might survive a restart of the Gimp application, but you cannot count on this. "Gimp::Data" will try to freeze your data when you pass in a reference. On retrieval, the data is thawed again. See Storable for more info. This might be implemented through either Storable or Data::Dumper, or not implemented at all (i.e. silently fail) ;) PERSISTANCE
"Gimp::Data" contains the following functions to ease applications where persistence for perl data structures is required: Gimp::Data::freeze(reference) Freeze (serialize) the reference. Gimp::Data::thaw(data) Thaw (unserialize) the dsata and return the original reference. LIMITATIONS
You cannot store references, and you cannot (yet) iterate through the keys (with "keys", "values" or "each"). AUTHOR
Marc Lehmann <pcg@goof.com> SEE ALSO
perl(1), Gimp. perl v5.8.0 2001-12-06 Data(3)

Check Out this Related Man Page

Feature(3)						User Contributed Perl Documentation						Feature(3)

NAME
Gimp::Feature - check for specific features to be present before registering the script. SYNOPSIS
use Gimp::Feature; or use Gimp::Feature qw(feature1 feature2 ...); DESCRIPTION
This module can be used to check for specific features to be present. This can be used to deny running the script when neccessary features are not present. While some features can be checked for at any time, the Gimp::Fu module offers a nicer way to check for them. "gtk" checks for the presence of the gtk interface module. "gtk-1.1", "gtk-1.2" checks for the presence of gtk-1.1 (1.2) or higher. "perl-5.005" checks for perl version 5.005 or higher. "pdl" checks for the presence of a suitable version of PDL (>=1.9906). "gnome" checks for the presence of the Gnome-Perl module. "gtkxmhtl" checks for the presence of the Gtk::XmHTML module. "unix" checks wether the script runs on a unix-like operating system. At the moment, this is every system except windows, macos, os2 and vms. "persistency" checks wether the "Gimp::Data" module (Gimp::Data) can handle complex persistent data structures, i.e. perl references in addition to plain strings. The following features can only be checked after "Gimp-"main> has been called (usually found in the form "exit main"). See Gimp::Fu on how to check for these. "gimp-1.1", "gimp-1.2" checks for the presense of gimp in at least version 1.1 (1.2). FUNCTIONS present(feature) Checks for the presense of the single feature given as the argument. Returns true if the feature is present, false otherwise. need(feature,[function-name]) Require a specific feature. If the required feature is not present the program will exit gracefully, logging an appropriate message. You can optionally supply a function name to further specify the place where this feature was missing. This is the function used when importing symbols from the module. missing(feature-description,[function-name]) Indicates that a generic feature (described by the first argument) is missing. A function name can further be specified. This function will log the given message and exit gracefully. describe(feature) Returns a string describing the given feature in more detail, or undef if there is no description for this feature. list() Returns a list of features that can be checked for. This list might not be complete. AUTHOR
Marc Lehmann <pcg@goof.com> SEE ALSO
perl(1), Gimp(1). perl v5.8.0 1999-11-22 Feature(3)
Man Page