Graciliano M. P. wrote:
The first question I have...What is "HPL"?  That puzzled me the most,
and I don't believe it is at all obvious.


HPL is another Perl embeded in HTML, where some resources, like the HTML
block, that exists in Class::HPLOO, were ported (simplier), to Class::HPLOO.
...
> The idea of Class::HPLOO is to write the ./lib modules of a web site
> in a syntax similar to HPL, and easier.


I don't see how HPL (an HTML templating system) is related to class syntax in Perl. Modules should be modular and each do one thing, one thing well. This module is widely applicable, including to many non-web applications. It seems, to me at least, that Class::HPLOO can be split into two fully independent modules (HPL and Class).



The semantics "return 0 makes the creation of the object return undef"
can be prone to nonobvious errors.  For example, looking at your
included classtest.pm example,

  class Foo extends Bar , Baz {
    sub Foo {
      $this->{attr} = $_[0] ;
    }
    ...
  }



Yes, you are right, and thanks for the advice. Maybe use some constant for
that, that makes a reference to something, and if the constant is returned
make the constructor return undef:

class Foo {
  sub Foo {
    return UNDEF ;
  }
  ...
}

Where UNDEF is:

sub UNDEF { \"" }


The following improvement makes it unambiguous:

sub UNDEF { bless {}, "Class::HPLOO::UNDEF" }

followed by

return undef if ref($ret) eq 'Class::HPLOO::UNDEF';

About, Perl6::Classes, it has a lot of bugs and a complex syntax, since has
a lot of resources for methods, attributes, etc... The most of the bugs of
Perl6::Classes, are from Text::Balanced, that make a big problem with the
place holder syntax. Since they use for the place holder of the quoted
strings:

$;XXXX$;

where XXXX are chars from 0 to 255, and represent a binary number of 4
digits. But this tell to use that XXXX can have any character, and this
characters can broke the syntax, since they accept:

# @ $ % \n \r

And is common to use this characters above in our filters! Soo, I insert
another place holder to fix that.

Other bug is with

q|qq|qr|qw|qx|tr|y|s|m.

Text::Balanced will think that this are quoted strings or patterns:

  $this->{y} ;
  $this->{q} ;
  $this->{s} ;
  sub ($q) { ... }

Soo, Text::Balanced still have a lot of work to fix that!


Text::Balanced and Filter::Simple indeed have quite a few bugs, which means that basically means any module that does source filtering is buggy. I emailed five Text::Balanced bug patches with test cases to the author over the last two weeks but am still waiting for a response. Since Text::Balanced is a core module, distributed with Perl, I'm not sure what the best way to report these are. E-mail the author? rt.cpan.org? http://rt.perl.org (perlbug)? I prefer the bug tracking systems, but both seem barely used for this (e.g. http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-Balanced). There are also problems that can be fixed in Filter::Simple (e.g. FILTER_ONLY implementation), which is also a core module, but the rt.cpan.org page for it appears dormant as well. -I'm willing to submit patches-, but there seems like there should be a more formal patch submission process with multiple people able to commit on modules that are core. Anyone have any comments?

-davidm



Reply via email to