{"id":238,"date":"2022-08-30T14:58:01","date_gmt":"2022-08-30T14:58:01","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/08\/31\/filefindrulelibmagic-is-it-ok-to-keep-options-with-undefined-values-record-and-share-programming-errors\/"},"modified":"2022-08-30T14:58:01","modified_gmt":"2022-08-30T14:58:01","slug":"filefindrulelibmagic-is-it-ok-to-keep-options-with-undefined-values-record-and-share-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/filefindrulelibmagic-is-it-ok-to-keep-options-with-undefined-values-record-and-share-programming-errors\/","title":{"rendered":"File::Find::Rule::LibMagic: Is it ok to keep options with undefined values?-Record and share programming errors"},"content":{"rendered":"<p>There should be no problem in having <code>maxdepth<\/code> set to <code>undef<\/code> by using a variable with <code>undef<\/code> as its value. Every variable in Perl starts out with the <code>undef<\/code> value.<\/p>\n<h3>More Details<\/h3>\n<p><code>File::Find::Rule::LibMagic<\/code> extends <code>File::Find::Rule<\/code>. The <code>find<\/code> function in <code>File::Find::Rule<\/code> starts with:<\/p>\n<pre><code>sub find {\n    my $object = __PACKAGE__-&gt;new();\n<\/code><\/pre>\n<p>The <code>new<\/code> functions returns:<\/p>\n<pre><code>bless {\n    rules    =&gt; [],\n    subs     =&gt; {},\n    iterator =&gt; [],\n    extras   =&gt; {},\n    maxdepth =&gt; undef,\n    mindepth =&gt; undef,\n}, $class;\n<\/code><\/pre>\n<p>Note that <code>maxdepth<\/code> by default is set to <code>undef<\/code>.<\/p>\n<p id=\"rop\"><small>Originally posted 2013-08-31 05:58:09. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>There should be no problem in having maxdepth set to undef by using a variable with undef as its value. Every variable in Perl starts out with the undef value. More Details File::Find::Rule::LibMagic extends File::Find::Rule. The find function in File::Find::Rule starts with: sub find { my $object = __PACKAGE__-&gt;new(); The new functions returns: bless { [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-238","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=238"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/238\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}