You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
YAML has a special syntax to serialize objects, the !!perl/<reftype>:<class> syntax. Instead of allowing this, we should serialize it into a plain hash or a simple string ourselves.
This happens when we run statocles blog post with the EDITOR variable set in our environment, type in our link and our post, and then quit our editor. Statocles loads the document we wrote (which inflates the Statocles::Link objects), adds the things it needs, generates the post slug and directory, and then re-writes the document back out. When it writes the document back out, it passes in the Statocles::Link objects directly to YAML, which creates the YAML-serialized !!perl/hash:Statocles::Link thing.
The routine that performs this serialization is Statocles::Store::_freeze_document. This routine is where this bug needs to be fixed.
The text was updated successfully, but these errors were encountered:
When we take a bunch of Statocles::Link objects and serialize them in the markdown file, they appear like so:
YAML has a special syntax to serialize objects, the
!!perl/<reftype>:<class>
syntax. Instead of allowing this, we should serialize it into a plain hash or a simple string ourselves.This happens when we run
statocles blog post
with theEDITOR
variable set in our environment, type in our link and our post, and then quit our editor. Statocles loads the document we wrote (which inflates the Statocles::Link objects), adds the things it needs, generates the post slug and directory, and then re-writes the document back out. When it writes the document back out, it passes in the Statocles::Link objects directly to YAML, which creates the YAML-serialized!!perl/hash:Statocles::Link
thing.The routine that performs this serialization is Statocles::Store::_freeze_document. This routine is where this bug needs to be fixed.
The text was updated successfully, but these errors were encountered: