[WM] [Q] get_metadata

Justin Mason jm.jmason.org
Wed Oct 31 15:36:03 GMT 2001


Chris said:

> I hope that I'm not too annoying, but as I like the power of WebMake it's fun
> for me to play around with it. This result in man questions, as you might
> notice :-).

No problem -- it's interesting to see which bits I've forgotten to
document enough, and I'm sure others are finding it illuminating too ;)

> 	  my $myup = $pg2->get_metadata("up");
> does not woerk.

Yes, someone else asked about the get_metadata() method.  I think,
fundamentally, I need to fix it so it will work properly; in some
circumstances it will not return metadata unless the content item has
been read :(

>          my $myup = $pg2->{main}->quiet_curly_meta_subst
>                                  ($HTML::WebMake::Main::SUBST_META,
>                                  $pg2->{name}.".up");

BTW you could also subst the string '$['.$pg2->{name}.'.up]' -- the
two are equivalent.

> It seems to be a problem of "up" being not a builtin metadata object defined
> in Metadata.pm.
> Is this behaviour intedend or not?

no, it is not; firstly, you will probably get a warning along those lines,
but it's a red herring.  (The development version at the moment includes a
fix for that anyway.)

the real problem is the get_metadata() method not working in an intuitive
way.  To make sense (!!) it should operate exactly the same as the
quiet_curly_meta_subst() above.

--j.




More information about the Webmake-talk mailing list