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

Net(3)							User Contributed Perl Documentation						    Net(3)

NAME
Gimp::Net - Communication module for the gimp-perl server. SYNOPSIS
use Gimp; DESCRIPTION
For Gimp::Net (and thus commandline and remote scripts) to work, you first have to install the "Perl-Server" extension somewhere where Gimp can find it (e.g in your .gimp/plug-ins/ directory). Usually this is done automatically while installing the Gimp extension. If you have a menu entry "<Xtns"/Perl-Server> then it is probably installed. The Perl-Server can either be started from the "<Xtns"> menu in Gimp, or automatically when a perl script can't find a running Perl-Server. When started from within The Gimp, the Perl-Server will create a unix domain socket to which local clients can connect. If an authorization password is given to the Perl-Server (by defining the environment variable "GIMP_HOST" before starting The Gimp), it will also listen on a tcp port (default 10009). Since the password is transmitted in cleartext, using the Perl-Server over tcp effectively lowers the security of your network to the level of telnet. Even worse: the current Gimp::Net-protocol can be used for denial of service attacks, i.e. crashing the Perl-Server. There also *might* be buffer-overflows (although I do care a lot for these). ENVIRONMENT
The environment variable "GIMP_HOST" specifies the default server to contact and/or the password to use. The syntax is [auth@][tcp/]host- name[:port] for tcp, [auth@]unix/local/socket/path for unix and spawn/ for a private gimp instance. Examples are: www.yahoo.com # just kidding ;) yahoo.com:11100 # non-standard port tcp/yahoo.com # make sure it uses tcp authorize@tcp/yahoo.com:123 # full-fledged specification unix/tmp/unx # use unix domain socket password@unix/tmp/test # additionally use a password authorize@ # specify authorization only spawn/ # use a private gimp instance spawn/nodata # pass --no-data switch spawn/gui # don't pass -n switch CALLBACKS
net() is called after we have succesfully connected to the server. Do your dirty work in this function, or see Gimp::Fu for a better solu- tion. FUNCTIONS
server_quit() sends the perl server a quit command. get_connection() return a connection id which uniquely identifies the current connection. set_connection(conn_id) set the connection to use on subsequent commands. "conn_id" is the connection id as returned by get_connection(). BUGS
(Ver 0.04) This module is much faster than it ought to be... Silly that I wondered wether I should implement it in perl or C, since perl is soo fast. AUTHOR
Marc Lehmann <pcg@goof.com> SEE ALSO
perl(1), Gimp. perl v5.8.0 2001-12-06 Net(3)
Man Page