STAR::Dictionary(3pm)

πŸ“¦
version 0.59 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy

πŸ’– STAR::Dictionary πŸ’–

okay bestie, so this is a Perl extension for wrangling dictionaries that got parsed out of STAR compliant files. it's giving very much "glue code that holds your crystallography data together" and honestly? iconic. πŸŽ€

this is the STAR::Dictionary page from the User Contributed Perl Documentation set. and yes, this doc is talking about version 0.56 of the module specifically, no cap. ✨


🌸 SYNOPSIS 🌸

use STAR::Dictionary;

$dict_obj = STAR::Dictionary->new(-file=>$file);
@items_in_dict = $dict_obj->get_save_blocks;

like, that's it. that's the whole vibe. you make the object, you pull the blocks. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

this package is absolutely packed with class and object methods for Dictionary objects that were created by STAR::Parser. fr fr, it doesn't just make them itself β€” it works on what the parser hands it.

so here's the family tree: this class is a <b>sub class</b> of STAR::DataBlock. which means it inherits everything β€” it supports all the methods from STAR::DataBlock (go peek at the related documentation for those, iykyk), <b>plus</b> one extra little gift of a method all its own: get_save_blocks. she's adding to the legacy, periodt. πŸ‘‘


πŸ’… OBJECT METHODS πŸ’…

🫢 get_save_blocks

Usage:   @save_blocks = $dict_obj->get_save_blocks;

mkay so what this method does: it hands you back an array with all the save_ blocks it can find in the Dictionary object. no filters, no drama, just all of them. 🌈

and here's the tea β˜• β€” every single item defined in the dictionary gets described inside a save block. every one. but wait, there's a plot twist: the items that are about the dictionary itself (think stuff like _dictionary.version) are <b>not</b> in save blocks at all. they live outside of them, just chilling in the dictionary file.

and in the data structure of a Dictionary object? those self-referential items get gathered up into a "$s='-'" save block. so they're not lost, bestie, they just get their own little corner. πŸ“


πŸ‘‘ AUTHOR πŸ‘‘

Wolfgang Bluhm, reachable at mail@wbluhm.com πŸ’Œ

🌟 Acknowledgments

big shoutout and so much love to Phil Bourne, Helge Weissig, Anne Kuller, Doug Greer, Michele Bluhm, and others for the support, the help, and the comments. the way that community showed up for this module... we love to see it. 😭🫢


a full copyright statement is provided with the distribution. πŸ“œ

Copyright (c) 2000 University of California, San Diego


🌈 SEE ALSO 🌈

  • STAR::Parser
  • STAR::DataBlock

and that's the whole page, bestie! πŸŽ€ this was perl v5.18.1, dated 2001-05-22. like, this documentation is older than most of us and it's still serving looks. stay iconic, drink water, and go read your save blocks. πŸ’œβœ¨

πŸ“¦ where this page comes from