Hi All,
I'm looking through some Perl files for software we use and I noticed this
in one of the config files:
$c->{guess_doc_type} ||= sub {
All other similar config files show a similar structure, but without the
"||" before the equals sign:
$c->{validate_document} = sub {
My question is, what is the "||" doing in the first example?
It would be useful to know before I go changing anything. My instinct is
that it's an "or" but that really doesn't make sense in this context.
I've attempted to Google this, but found no solid answer.
Thanks,
James