Padre::Util.3pm

Langue: en

Version: 2009-03-29 (fedora - 05/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

Padre::Util - Padre Non-Wx Utility Functions

DESCRIPTION

The Padre::Util package is a internal storage area for miscellaneous functions that aren't really Padre-specific that we want to throw somewhere it won't clog up task-specific packages.

All functions are exportable and documented for maintenance purposes, but except for in the Padre core distribution you are discouraged in the strongest possible terms for relying on these functions, as they may be moved, removed or changed at any time without notice.

FUNCTIONS


newline_type

   my $type = newline_type( $string );
 
 

Returns None if there was not CR or LF in the file.

Returns UNIX, Mac or Windows if only the appropriate newlines were found.

Returns Mixed if line endings are mixed.

get_matches

Paramters:

* The text in which we need to search

* The regular expression

* The offset within the text where we the last match started
  so the next forward match must start after this.

* The offset within the text where we the last match ended
  so the next backward match must end before this.

* backward bit (1 = search backward, 0 = search forward)

_T

This is the shorthand of Wx::gettext('some text to translate')

Specifically to be used for strings that you want to delay translation until later, so that the translation tools can find it.

get_project_dir

Given a file it will try to locate the root directory of the given project. This is a temporary work around till we get full project support but it is used by some (SVK) plugins.

SUPPORT

See the support section of the main Padre module. Copyright 2008-2009 The Padre development team as listed in Padre.pm.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.