[Rt-commit] r20031 - in rt/3.999/trunk/lib: . RT RT/Interface/Web RT/Model
alexmv at bestpractical.com
alexmv at bestpractical.com
Fri Jun 19 13:12:05 EDT 2009
Author: alexmv
Date: Fri Jun 19 13:12:04 2009
New Revision: 20031
Modified:
rt/3.999/trunk/lib/RT.pm
rt/3.999/trunk/lib/RT/HasRoleGroups.pm
rt/3.999/trunk/lib/RT/Interface/Web/Handler.pm
rt/3.999/trunk/lib/RT/IsPrincipal.pm
rt/3.999/trunk/lib/RT/Model/GroupCollection.pm
rt/3.999/trunk/lib/RT/Model/Template.pm
rt/3.999/trunk/lib/RT/Model/Transaction.pm
rt/3.999/trunk/lib/RT/Model/User.pm
rt/3.999/trunk/lib/RT/Record.pm
rt/3.999/trunk/lib/RT/ScripAction/SendEmail.pm
rt/3.999/trunk/lib/RT/SharedSetting.pm
rt/3.999/trunk/lib/RT/Shredder.pm
Log:
POD cleanups -- whitespace and L</whatever> fixes, mostly
Modified: rt/3.999/trunk/lib/RT.pm
==============================================================================
--- rt/3.999/trunk/lib/RT.pm (original)
+++ rt/3.999/trunk/lib/RT.pm Fri Jun 19 13:12:04 2009
@@ -105,8 +105,8 @@
=head2 init
-L<Connect to the database /connect_to_database>, L<initilizes system objects /InitSystemobjects>,
-L<preloads classes /InitClasses>
+L<Initilizes system objects|init_system_objects>, and L<configures
+plugins|init_plugins>.
=cut
@@ -163,10 +163,10 @@
}
}
-=head2 InitSystemobjects
+=head2 init_system_objects
-Initializes system objects: C<RT->system>, C<RT->system_user>
-and C<RT->nobody>.
+Initializes system objects: C<< RT->system >>, C<< RT->system_user >>
+and C<< RT->nobody >>.
=cut
@@ -182,20 +182,18 @@
=head1 CLASS METHODS
-=head2 Config
+=head2 config
-Returns the current L<config object RT::Config>, but note that
-you must L<load config /load_config> first otherwise this method
-returns undef.
+Returns the current L<config object|RT::Model::Config>.
Method can be called as class method.
=cut
-=head2 System
+=head2 system
-Returns the current L<system object RT::System>. See also
-L</InitSystemobjects>.
+Returns the current system object L<RT::System>. See also
+L</init_system_objects>.
=cut
@@ -205,7 +203,7 @@
Returns the system user's object, it's object of
L<RT::CurrentUser> class that represents the system. See also
-L</InitSystemobjects>.
+L</init_system_objects>.
=cut
@@ -220,7 +218,7 @@
Returns object of Nobody. It's object of L<RT::CurrentUser> class
that represents a user who can own ticket and nothing else. See
-also L</InitSystemobjects>.
+also L</init_system_objects>.
=cut
@@ -293,7 +291,8 @@
=head2 init_plugins
-Initialze all Plugins found in the RT configuration file, setting up their lib and HTML::Mason component roots.
+Initialize all Plugins found in the RT configuration file, setting up
+their lib and HTML::Mason component roots.
=cut
@@ -339,7 +338,7 @@
=head2 local_path
-The root of F</local (user overrides)
+The root of F</local> (user overrides)
=cut
Modified: rt/3.999/trunk/lib/RT/HasRoleGroups.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/HasRoleGroups.pm (original)
+++ rt/3.999/trunk/lib/RT/HasRoleGroups.pm Fri Jun 19 13:12:04 2009
@@ -13,7 +13,7 @@
=over 4
-=item type is one of defined by L</roles> of this object.
+=item type is one of defined by C<roles> of this object.
=item principal is an id of L<RT::Model::Principal>
Modified: rt/3.999/trunk/lib/RT/Interface/Web/Handler.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Interface/Web/Handler.pm (original)
+++ rt/3.999/trunk/lib/RT/Interface/Web/Handler.pm Fri Jun 19 13:12:04 2009
@@ -157,6 +157,7 @@
be called as default callback for F</autohandler>.
=cut
+
{
package Jifty::View::Mason::Request;
Modified: rt/3.999/trunk/lib/RT/IsPrincipal.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/IsPrincipal.pm (original)
+++ rt/3.999/trunk/lib/RT/IsPrincipal.pm Fri Jun 19 13:12:04 2009
@@ -48,9 +48,9 @@
sub type_for_acl { return undef }
-=head2 principal
+=head2 principal
-Returns L<RT::Model::Principal/|"the principal object"> for this record.
+Returns the L<RT::Model::Principal> object for this record.
Each record which share this role must have one principal record. Returns
undef on error.
@@ -78,7 +78,7 @@
return $res;
}
-=head2 principal_id
+=head2 principal_id
Returns id of the principal record for this object.
Modified: rt/3.999/trunk/lib/RT/Model/GroupCollection.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Model/GroupCollection.pm (original)
+++ rt/3.999/trunk/lib/RT/Model/GroupCollection.pm Fri Jun 19 13:12:04 2009
@@ -131,18 +131,30 @@
=over 4
-=item object - an object roles of which should be looked, replaces the following
-two arguments;
+=item object
-=item model - mandatory name of a model, for example: 'RT::Model::Ticket';
+An object roles of which should be looked, replaces the following two
+arguments;
-=item instance - optional id of the model record;
+=item model
-=item type - optional type of the role groups, for example 'cc';
+Mandatory name of a model, for example: 'RT::Model::Ticket';
-=item subclause and entry_aggregator - use to combine with different conditions;
-by default aggregator is 'OR' and subclause matches name of the method, so you can
-call this method multiple times and get role of groups of different models.
+=item instance
+
+Optional id of the model record;
+
+=item type
+
+Optional type of the role groups, for example 'cc';
+
+=item subclause and entry_aggregator
+
+Use to combine with different conditions; by default aggregator is
+'OR' and subclause matches name of the method, so you can call this
+method multiple times and get role of groups of different models.
+
+=back
=cut
Modified: rt/3.999/trunk/lib/RT/Model/Template.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Model/Template.pm (original)
+++ rt/3.999/trunk/lib/RT/Model/Template.pm Fri Jun 19 13:12:04 2009
@@ -151,14 +151,14 @@
Takes a paramhash of content, queue, name and description.
name should be a unique string identifying this Template.
description and content should be the template's title and content.
-queue should be 0 for a global template and the queue # for a queue-specific
+queue should be 0 for a global template and the queue # for a queue-specific
template.
Returns the Template's id if the create was successful. Returns undef on error.
In list context returns a message as well.
=head2 is_empty
-
+
Returns true value if content of the template is empty, otherwise
returns false.
@@ -172,10 +172,10 @@
}
=head2 mime_obj
-
-Returns L<MIME::Entity> object parsed using L</Parse> method. Returns
-undef if last call to L</Parse> failed or never be called.
-
+
+Returns L<MIME::Entity> object parsed using L</parse> method. Returns
+undef if last call to L</parse> failed or never be called.
+
Note that content of the template is UTF-8, but L<MIME::Parser> is not
good at handling it and all data of the entity should be treated as
octets and converted to perl strings using Encode::decode_utf8 or
@@ -191,13 +191,13 @@
=head2 parse
- This routine performs Text::Template parsing on the template and then
- imports the results into a MIME::Entity so we can really use it
+This routine performs Text::Template parsing on the template and then
+imports the results into a MIME::Entity so we can really use it
- Takes a hash containing Argument, ticket_obj, and transaction_obj.
+Takes a hash containing Argument, ticket_obj, and transaction_obj.
- It returns a tuple of (val, message)
- If val is 0, the message contains an error message
+It returns a tuple of (val, message) If val is 0, the message contains
+an error message.
Note that content of the template is UTF-8, but L<MIME::Parser> is not
good at handling it and all data of the entity should be treated as
@@ -207,17 +207,17 @@
=cut
=head2 parse
-
+
This routine performs L<Text::Template> parsing on the template and then
imports the results into a L<MIME::Entity> so we can really use it. Use
L</mime_obj> method to get the L<MIME::Entity> object.
-
+
Takes a hash containing Argument, ticket_obj, and transaction_obj and other
arguments that will be available in the template's code.
-
+
It returns a tuple of (val, message). If val is false, the message contains
an error message.
-
+
=cut
sub parse {
Modified: rt/3.999/trunk/lib/RT/Model/Transaction.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Model/Transaction.pm (original)
+++ rt/3.999/trunk/lib/RT/Model/Transaction.pm Fri Jun 19 13:12:04 2009
@@ -561,7 +561,8 @@
=head2 addresses
-Returns a hashref of addresses related to this transaction. See L<RT::Model::Attachment/Addresses> for details.
+Returns a hashref of addresses related to this transaction. See
+L<RT::Model::Attachment/addresses> for details.
=cut
@@ -577,9 +578,10 @@
}
-=head2 content_obj
+=head2 content_obj
-Returns the RT::Model::Attachment object which contains the content for this Transaction
+Returns the L<RT::Model::Attachment> object which contains the content
+for this Transaction.
=cut
@@ -632,7 +634,7 @@
If this transaction has attached mime objects, returns the first one's subject
Otherwise, returns null
-
+
=cut
sub subject {
@@ -1138,14 +1140,16 @@
}
=head2 update_custom_fields
-
- Takes a hash of
+
+Takes a hash of
CustomField-<<Id>> => Value
- or
- object-RT::Model::Transaction-CustomField-<<Id>> => Value parameters to update
- this transaction's custom fields
+or
+
+ object-RT::Model::Transaction-CustomField-<<Id>> => Value
+
+parameters to update this transaction's custom fields
=cut
@@ -1226,15 +1230,21 @@
"RT::Model::Queue-RT::Model::Ticket-RT::Model::Transaction";
}
-=item deferred_recipients($freq, $include_sent )
+=head2 deferred_recipients($freq, $include_sent )
Takes the following arguments:
=over
-=item * a string to indicate the frequency of digest delivery. Valid values are "daily", "weekly", or "susp".
+=item *
+
+A string to indicate the frequency of digest delivery. Valid values
+are "daily", "weekly", or "susp".
+
+=item *
-=item * an optional argument which, if true, will return addresses even if this notification has been marked as 'sent' for this transaction.
+An optional argument which, if true, will return addresses even if
+this notification has been marked as 'sent' for this transaction.
=back
Modified: rt/3.999/trunk/lib/RT/Model/User.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Model/User.pm (original)
+++ rt/3.999/trunk/lib/RT/Model/User.pm Fri Jun 19 13:12:04 2009
@@ -757,9 +757,9 @@
}
=head3 has_password
-
-Returns true if the user has a valid password, otherwise returns false.
-
+
+Returns true if the user has a valid password, otherwise returns false.
+
=cut
sub has_password {
@@ -819,7 +819,7 @@
=head3 generate_auth_string
Takes a string and returns back a hex hash string. Later you can use
-this pair to make sure it's generated by this user using L</ValidateAuthString>
+this pair to make sure it's generated by this user using L</validate_auth_string>
=cut
@@ -836,7 +836,7 @@
=head3 validate_auth_string
Takes auth string and protected string. Returns true is protected string
-has been protected by user's L</AuthToken>. See also L</GenerateAuthString>.
+has been protected by user's C<auth_token>. See also L</generate_auth_string>.
=cut
@@ -858,7 +858,7 @@
set, all password checks for this user will fail. All ACL checks for this
user will fail. The user will appear in no user listings.
-=cut
+=cut
sub set_disabled {
my $self = shift;
@@ -1004,7 +1004,7 @@
}
=head2 current_user_has_right
-
+
Takes a single argument. returns 1 if $Self->current_user
has the requested right. returns undef otherwise
Modified: rt/3.999/trunk/lib/RT/Record.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Record.pm (original)
+++ rt/3.999/trunk/lib/RT/Record.pm Fri Jun 19 13:12:04 2009
@@ -413,7 +413,8 @@
=head2 last_updated_by_obj
- Returns an RT::Model::User object of the last user to touch this object
+Returns an L<RT::Model::User> object of the last user to touch this
+object
=cut
@@ -428,7 +429,7 @@
-=head2 URI
+=head2 uri
Returns this record's URI
@@ -682,8 +683,8 @@
=head2 members
- This returns an RT::Model::LinkCollection object which references all the tickets
-which are 'MembersOf' this ticket
+This returns an L<RT::Model::LinkCollection> object which references
+all the tickets which are 'MembersOf' this ticket
=cut
@@ -696,8 +697,8 @@
=head2 member_of
- This returns an RT::Model::LinkCollection object which references all the tickets that this
-ticket is a 'MemberOf'
+This returns an L<RT::Model::LinkCollection> object which references all
+the tickets that this ticket is a 'MemberOf'
=cut
@@ -710,7 +711,8 @@
=head2 refers_to
- This returns an RT::Model::LinkCollection object which shows all references for which this ticket is a base
+This returns an L<RT::Model::LinkCollection> object which shows all
+references for which this ticket is a base
=cut
@@ -723,7 +725,8 @@
=head2 referred_to_by
-This returns an L<RT::Model::LinkCollection> object which shows all references for which this ticket is a target
+This returns an L<RT::Model::LinkCollection> object which shows all
+references for which this ticket is a target
=cut
@@ -736,7 +739,8 @@
=head2 depended_on_by
- This returns an RT::Model::LinkCollection object which references all the tickets that depend on this one
+This returns an L<RT::Model::LinkCollection> object which references
+all the tickets that depend on this one
=cut
@@ -890,7 +894,8 @@
=head2 depends_on
- This returns an RT::Model::LinkCollection object which references all the tickets that this ticket depends on
+This returns an L<RT::Model::LinkCollection> object which references
+all the tickets that this ticket depends on
=cut
@@ -1071,7 +1076,7 @@
Either base or target must be null. The null value will
be replaced with this ticket\'s id
-=cut
+=cut
sub _delete_link {
my $self = shift;
@@ -1215,7 +1220,8 @@
=head2 transactions
- Returns an RT::Model::TransactionCollection object of all transactions on this record object
+Returns an L<RT::Model::TransactionCollection> object of all
+transactions on this record object
=cut
@@ -1271,7 +1277,7 @@
return $object->id;
}
-=head2 custom_field_lookup_type
+=head2 custom_field_lookup_type
Returns the path RT uses to figure out which custom fields apply to this object.
@@ -1286,13 +1292,13 @@
=head2 add_custom_field_value { Field => column, value => value }
value should be a string. column can be any identifier of a CustomField
-supported by L</LoadCustomFieldByIdentifier> method.
+supported by L</load_custom_field_by_identifier> method.
Adds value as a value of CustomField column. If this is a single-value custom field,
deletes the old value.
-If value is not a valid value for the custom field, returns
+If value is not a valid value for the custom field, returns
(0, 'Error message' ) otherwise, returns ($id, 'Success Message') where
-$id is ID of Created L<ObjectCustomFieldValue> object.
+$id is ID of Created L<RT::Model::ObjectCustomFieldValue> object.
=cut
@@ -1476,11 +1482,11 @@
=head2 delete_custom_field_value { Field => column, value => value }
-Deletes value as a value of CustomField column.
+Deletes value as a value of CustomField column.
value can be a string, a CustomFieldValue or a ObjectCustomFieldValue.
-If value is not a valid value for the custom field, returns
+If value is not a valid value for the custom field, returns
(0, 'Error message' ) otherwise, returns (1, 'Success Message')
=cut
@@ -1541,7 +1547,7 @@
=head2 custom_field_values column
-Return a ObjectCustomFieldValues object of all values of the CustomField whose
+Return a ObjectCustomFieldValues object of all values of the CustomField whose
id or name is column for this record.
Returns an RT::Model::ObjectCustomFieldValueCollection object
Modified: rt/3.999/trunk/lib/RT/ScripAction/SendEmail.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/ScripAction/SendEmail.pm (original)
+++ rt/3.999/trunk/lib/RT/ScripAction/SendEmail.pm Fri Jun 19 13:12:04 2009
@@ -80,7 +80,7 @@
=head2 clean_slate
-Cleans class-wide options, like L</SquelchMailTo> or L</AttachTickets>.
+Cleans class-wide options, like L</squelch_mail_to> or L</attach_tickets>.
=cut
@@ -454,7 +454,7 @@
=head2 add_tickets
Attaches tickets to the current message, list of tickets' ids get from
-L</AttachTickets> method.
+L</attach_tickets> method.
=cut
@@ -571,7 +571,7 @@
return $id;
}
-=head2 set_rtspecialheaders
+=head2 set_rt_special_headers
This routine adds all the random headers that RT wants in a mail message
that don't matter much to anybody else.
@@ -943,7 +943,7 @@
If subject is already defined via template, it uses that. otherwise, it tries to get
the transaction's subject.
-=cut
+=cut
sub set_subject {
my $self = shift;
@@ -1097,7 +1097,7 @@
}
-=head2 mimeencode_string STRING ENCODING
+=head2 mime_encode_string STRING ENCODING
Takes a string and a possible encoding and returns the string wrapped in MIME goo.
Modified: rt/3.999/trunk/lib/RT/SharedSetting.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/SharedSetting.pm (original)
+++ rt/3.999/trunk/lib/RT/SharedSetting.pm Fri Jun 19 13:12:04 2009
@@ -139,7 +139,7 @@
=head2 load_by_id
First loads up the L<RT::Model::Attribute> for this shared setting by ID, then calls
-L</Load> with the correct parameters. Returns a tuple of status and message,
+L</load> with the correct parameters. Returns a tuple of status and message,
where status is true on success.
=cut
@@ -170,17 +170,17 @@
=head2 post_load
-Called after after successful L</Load>.
+Called after after successful L</load>.
=cut
sub post_load { }
-=head2 Save
+=head2 save
Creates a new shared setting. Takes a privacy, a name, and any other arguments.
Saves the given parameters to the appropriate user/group object, and loads the
-resulting object. Arguments are passed to the L</SaveAttribute> method, which
+resulting object. Arguments are passed to the L</save_attribute> method, which
does the actual update. Returns a tuple of status and message, where status is
true on success. Defaults are:
@@ -223,18 +223,18 @@
}
}
-=head2 SaveAttribute
+=head2 save_attribute
-An empty method for subclassing. Called from L</Save> method.
+An empty method for subclassing. Called from L</save> method.
=cut
sub save_attribute { }
-=head2 Update
+=head2 update
Updates the parameters of an existing shared setting. Any arguments are passed
-to the L</UpdateAttribute> method. Returns a tuple of status and message, where
+to the L</update_attribute> method. Returns a tuple of status and message, where
status is true on success.
=cut
@@ -279,7 +279,7 @@
sub update_attribute { }
=head2 delete
-
+
Deletes the existing shared setting. Returns a tuple of status and message,
where status is true upon success.
Modified: rt/3.999/trunk/lib/RT/Shredder.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Shredder.pm (original)
+++ rt/3.999/trunk/lib/RT/Shredder.pm Fri Jun 19 13:12:04 2009
@@ -247,9 +247,9 @@
=head3 GENERIC
-=head4 Init
+=head4 init
- RT::Shredder::Init( %default_options );
+ RT::Shredder::init( %default_options );
C<RT::Shredder::Init()> should be called before creating an
RT::Shredder object. It iniitalizes RT and loads the RT
@@ -292,11 +292,11 @@
$self->{'dump_plugins'} = [];
}
-=head4 CastobjectsToRecords( objects => undef )
+=head4 cast_objects_to_records ( objects => undef )
-Cast objects to the C<RT::Record> objects or its ancesstors.
+Cast objects to the L<RT::Record> objects or its ancesstors.
objects can be passed as SCALAR (format C<< <class>-<id> >>),
-ARRAY, C<RT::Record> ancesstors or C<RT::Collection> ancesstor.
+ARRAY, L<RT::Record> ancesstors or L<RT::Collection> ancesstor.
Most methods that takes C<objects> argument use this method to
cast argument value to list of records.
@@ -361,13 +361,13 @@
=head3 OBJECTS CACHE
-=head4 Putobjects( objects => undef )
+=head4 put_objects ( objects => undef )
Puts objects into cache.
Returns array of the cache entries.
-See C<CastobjectsToRecords> method for supported types of the C<objects>
+See L</cast_objects_to_records> method for supported types of the C<objects>
argument.
=cut
@@ -384,13 +384,13 @@
return @res;
}
-=head4 Putobject( object => undef )
+=head4 put_object ( object => undef )
Puts record object into cache and returns its cache entry.
B<NOTE> that this method support B<only C<RT::Record> object or its ancesstor
objects>, if you want put mutliple objects or objects represented by different
-classes then use C<Putobjects> method instead.
+classes then use C<put_objects> method instead.
=cut
@@ -407,7 +407,11 @@
return ( $self->{'cache'}->{$str} ||= { state => ON_STACK, object => $obj } );
}
-=head4 Getobject, GetState, GetRecord( String => ''| object => '' )
+=head4 get_object ( String => ''| object => '' )
+
+=head4 get_state ( String => ''| object => '' )
+
+=head4 get_record ( String => ''| object => '' )
Returns record object from cache, cache entry state or cache entry accordingly.
@@ -447,7 +451,11 @@
=head3 Dependencies resolvers
-=head4 PutResolver, GetResolvers and ApplyResolvers
+=head4 put_resolver
+
+=head4 get_resolvers
+
+=head4 apply_resolvers
TODO: These methods have no documentation.
@@ -598,20 +606,34 @@
=head3 Data storage and backups
-=head4 GetFilename( Filename => '<ISO DATETIME>-XXXX.sql', FromStorage => 1 )
+=head4 get_filename ( Filename => '<ISO DATETIME>-XXXX.sql', FromStorage => 1 )
Takes desired C<Filename> and flag C<FromStorage> then translate file name to absolute
path by next rules:
-* Default value of the C<Filename> option is C<< <ISO DATETIME>-XXXX.sql >>;
+=over
+
+=item *
+
+Default value of the C<Filename> option is C<< <ISO DATETIME>-XXXX.sql >>;
+
+=item *
+
+if C<Filename> has C<XXXX> (exactly four uppercase C<X> letters) then it would be changed with digits from 0000 to 9999 range, with first one free value;
+
+=item *
+
+if C<Filename> has C<%T> then it would be replaced with the current date and time in the C<YYYY-MM-DDTHH:MM:SS> format. Note that using C<%t> may still generate not unique names, using C<XXXX> recomended.
+
+=item *
-* if C<Filename> has C<XXXX> (exactly four uppercase C<X> letters) then it would be changed with digits from 0000 to 9999 range, with first one free value;
+if C<FromStorage> argument is true (default behaviour) then result path would always be relative to C<StoragePath>;
-* if C<Filename> has C<%T> then it would be replaced with the current date and time in the C<YYYY-MM-DDTHH:MM:SS> format. Note that using C<%t> may still generate not unique names, using C<XXXX> recomended.
+=item *
-* if C<FromStorage> argument is true (default behaviour) then result path would always be relative to C<StoragePath>;
+if C<FromStorage> argument is false then result would be relative to the current dir unless it's already absolute path.
-* if C<FromStorage> argument is false then result would be relative to the current dir unless it's already absolute path.
+=back
Returns an absolute path of the file.
@@ -690,12 +712,12 @@
return $file;
}
-=head4 StoragePath
+=head4 storage_path
Returns an absolute path to the storage dir. See
L<CONFIGURATION/$ShredderStoragePath>.
-See also description of the L</GetFilename> method.
+See also description of the L</get_filename> method.
=cut
More information about the Rt-commit
mailing list