SYMPA::WWW::SHAREDDOCUMENT(3Sympa)
π Sympa::WWW::SharedDocument(3Sympa) π
okay bestie, welcome to the manual page for Sympa::WWW::SharedDocument β aka Shared document repository and its nodes β¨. This is from the sympa 6.2.80 era, and it's genuinely one of the cutest little OO modules out there, no cap.
πΈ SYNOPSIS πΈ
use Sympa::WWW::SharedDocument;
$shared = Sympa::WWW::SharedDocument->new($list, $path);
%access = $shared->get_privileges('read', $email, 'md5', {...});
@children = $shared->get_children;
$parent = $shared->{parent};
π¦ DESCRIPTION π¦
Sympa::WWW::SharedDocument implements shared document repository of lists. that's the whole vibe. it's giving "your list's shared docs, fully object-oriented" π
π Methods π
new ( $list, [ $path, [ allow_empty => 1 ] ] )
Constructor. Creates new instance. iconic behavior honestly.
Parameters, bestie:
$listβ ASympa::Listinstance.$pathβ String to determine path or arrayref of path components. The path is relative to repository root.allow_empty => 1β Don't omit files with zero size. (zero-byte files deserve love too π₯Ί)
Returns:
- If
$pathis empty or not specified, returns new instance of repository root;{status}attribute will be set. - If
$pathis not empty and the path exists, returns new instance of node. - Otherwise returns false value. π
as_hashref ( )
Instance method. Casts the instance to hashref. literally the β¨glow-upβ¨ into a plain hash.
Parameters: None.
Returns: A hashref including attributes of instance (see "Attributes") and following special items:
{ancestors}β Arrayref of hashrefs including some attributes of all ancestor nodes.{context}β Hashref including name and host of the list.{date}β Localized form of{date_epoch}.{parent}β Hashref including attributes of parent node recursively.{paths_d}β Same as{paths}but, if the node is a directory, includes additional empty component at the end. This is useful when the path created byjoin()should be followed by additional"/"character.
count_children ( )
Instance method. Returns number of child nodes.
count_moderated_descendants ( )
Instance method. Returns number of nodes waiting for moderation. (they're in time-out π«Ά)
create_child ( $name, owner => $email, scenario => $scenario, type => $type, [ content => $content ] )
Instance method. Creates child node and returns it. TBD.
get_children ( [ moderate => boolean ], [ name => $name ], [ order_by => $order ], [ owner => $email ], [ allow_empty => 1 ] )
Instance method. Gets child nodes. collecting the whole friend group π
Parameters:
moderate => booleanname => $nameowner => $emailβ Filters results.order_by => $orderβ Sorts results.$ordermay be one of'order_by_doc'(by name of nodes),'order_by_author'(by owner),'order_by_size'(by size),'order_by_date'(by modification time). Default is ordering by names.allow_empty => 1β Don't omit nodes with zero size.
Returns: (Possibly empty) list of child nodes.
get_moderated_descendants ( )
Instance method. Returns the list of nodes waiting for moderation.
Parameters: None.
Returns: In array context, a list of nodes. In scalar context, an arrayref of them. (context matters, iykyk β¨)
get_privileges ( mode => $mode, sender => $sender, auth_method => $auth_method, scenario_context => $scenario_context )
Instance method. Gets privileges of a user on the node.
TBD.
get_size ( )
Instance method. Gets total size under current node.
install ( )
Instance method. Approves (install) file if it was held for moderation. freeing it from mod jail π
Returns: True value. If installation failed, returns false value and sets $ERRNO ($!).
rename ( $new_name )
Instance method. Renames file or directory.
Parameters:
$new_nameβ The name to be renamed to.
Returns: True value. If renaming failed, returns false value and sets $ERRNO ($!).
rmdir ( )
instance method. Removes directory from repository. Directory must be empty. (no surprise evictions allowed, it has to be empty first π)
Returns: True value. If removal failed, returns false value and sets $ERRNO ($!).
save_description ( )
Instance method. Creates or updates property description of the node.
unlink ( )
instance method. Removes file from repository.
Returns: True value. If removal failed, returns false value and sets $ERRNO ($!).
get_id ( )
Instance method. Returns unique identifier of instance. every instance is a main character with its own ID π
π§ Methods for repository root π§
create ( )
Instance method. Creates document repository on physical filesystem.
delete ( )
Instance method. Deletes document repository.
restore ( )
Instance method. Restores deleted document repository. the comeback arc we deserved π
π Functions π
valid_name ( $new_name )
Function. Check if the name is allowed for directory and file.
Note: This should be used with name of newly created node. Existing files and directories may have the name not allowed by this function.
β Attributes β
Instance of Sympa::WWW::SharedDocument may have following attributes. drink water, then read them all, bestie π§
{context}β Mandatory. Instance ofSympa::Listclass the shared document repository belongs to.{date_epoch}β Mandatory. Modification time of node in Unix time.{file_extension}β File extension if any.{fs_name}β Mandatory. Name of node on physical filesystem, i.e. the last part of{fs_path}.{fs_path}β Mandatory. Full path of node on physical filesystem.{html}β Only in HTML file. True value will be set.{icon}β URL to icon.{label}β Only in bookmark file. Label to be shown in hyperlink.{mime_type}β Only in regular file. MIME content type of the file if it is known.{moderate}β Set if node is held for moderation.{name}β Mandatory. Name of node accessible by users, i.e. the last item of{paths}.{owner}β Owner (author) of node, given by property description.{parent}β Parent node if any.Sympa::WWW::SharedDocumentinstance.{paths}β Mandatory. Arrayref to all path components of node accessible by users.{scenario}{read}{scenario}{edit}β Scenario names to define privileges. These may be given by property description.{serial_desc}β Modification time of property description in Unix time. Available if property description exists.{size}β Size of file.{status}β Only in repository root. Status of repository:'exist','deleted'or'none'.{title}β Description of node, given by property description.{type}β Mandatory. Type of node.'root'(the root of repository),'directory'(directory),'url'(bookmark file) or'file'(other file).{url}β Only in bookmark file. URL to be linked.
π FILES π
list home/shared/β Root of repository.... path/nameβ Directory or file.... path/.name.moderateβ Moderated directory or file.... path/name/.desc... path/.desc.name... path/.desc..name.moderateβ Property description of directories or files, not moderated or moderated.
Note: The path components ("name" above) are encoded to the format suitable to physical filesystem. Such conversion will be hidden behind object methods. (the β¨magicβ¨ is behind the curtain, you don't have to think about it)
π SEE ALSO π
Sympa::List, "qdecode_filename" in Sympa::Tools::Text, "qencode_filename" in Sympa::Tools::Text.
π HISTORY π
- SharedDocument module appeared on Sympa 5.2b.2.
- Rewritten
Sympa::SharedDocumentbegan to provide OO interface on Sympa 6.2.17. - It was renamed to
Sympa::WWW::SharedDocumenton Sympa 6.2.26.
okay that's the whole thing, you ate that reading session fr fr π
β¨ this was sympa 6.2.80, dated 2026-10-19, and it's the Sympa::WWW::SharedDocument(3Sympa) page π go create some shared docs, bestie π¦π«Ά
π¦ where this page comes from
- fedora 43: sympa-devel-doc 6.2.80-2.fc43 Β· GPL-2.0-or-later AND (OFL-1.1-RFN AND MIT) AND OFL-1.1-RFN AND MIT and (MIT OR GPL-2.0-only)
- fedora 44: sympa-devel-doc 6.2.80-2.fc44 Β· GPL-2.0-or-later AND (OFL-1.1-RFN AND MIT) AND OFL-1.1-RFN AND MIT and (MIT OR GPL-2.0-only)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms