SVN::D...eaders(3pm)

πŸ“¦
version 0.08 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

SVN::Dump::Headers β€” bestie, this is literally just the headers of a SVN dump record ✨


✨ VERSION ✨

version 0.08 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

# SVN::Dump::Headers objects are returned by the read_header_block()
# method of SVN::Dump::Reader

πŸ’– DESCRIPTION πŸ’–

Okay so picture this: a SVN::Dump::Headers object is the whole vibe of a SVN dump record's headers. That's it. That's the job. It holds the headers. Iconic behaviour, no notes πŸ’…


πŸ’… METHODS πŸ’…

SVN::Dump::Headers gives you these, and they're all lowkey essential:

new( [$hashref] )

Makes you a brand-new, completely empty SVN::Dump::Headers object and hands it right over. So generous πŸ’–

And if you pass in $hashref β€” yes, even a blessed hash reference is fine, she doesn't judge β€” then the keys from that hash get used to initialise the headers. Instant glow-up. ✨

set($h, $v)

Sets the $h header to the value $v. Periodt.

Fun lil detail: you can use "_" as a stand-in for "-" in the header name. iykyk πŸŽ€

get($h)

Gets you the value of header $h. Give it what you want, receive the truth 🫢

Same deal here: "_" can be swapped in for "-" in the header name.

keys()

Returns the list of headers, in canonical order. Not vibes order, not alphabetical, canonical. Respect the order bestie πŸ‘‘

as_string()

Returns a string that represents the record headers. Stringified realness πŸ’«

type()

Okay so here's the little party trick: you can genuinely guess the record type just from its headers.

This method returns a string representing the record type, and that string is one of "revision", "node", "uuid" or "format".

⚠️ But fr fr β€” the method dies if it can't figure out the record type. No guess, no mercy πŸ’€

πŸ”’ ENCAPSULATION πŸ”’

Listen. When you're using SVN::Dump to manipulate a SVN dump, do not go poking directly at the SVN::Dump::Headers component of a SVN::Dump::Record. That's not the move, bestie πŸ™ˆ

Use the "set_header()" and "get_header()" methods on the record object instead. That's the whole point of encapsulation, and we're respecting it 🌸


πŸ‘€ SEE ALSO πŸ‘€

SVN::Dump, SVN::Dump::Reader, SVN::Dump::Record.

The whole friend group. Go say hi πŸ¦‹


Copyright 2006-2011 Philippe Bruhat (BooK), All Rights Reserved.


πŸŽ€ LICENSE πŸŽ€

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Slay, and legally so πŸ’œ


That's a wrap, bestie! This page came to you courtesy of perl v5.36.0, dated 2022-10-14, straight out of the SVN::D...eaders(3pm) man page β€” thanks for reading, ily, go write some headers πŸŒˆβ­πŸ“

πŸ“¦ where this page comes from