> It looks like you shipped Text::MagicTemplate in HTML-MagicTemplate! CPAN
> doesn't know which one to pick, so it guessed.
>
> Just remove Text::MagicTemplate from HTML-MagicTemplate and upload new
> versions of both.

Thank you Michael.

The cause you are suggesting is not exactly the real cause that generates the
problem, but your suggestion helped me a lot to understand WHY this happen (even
if I don't have a solution yet).

It seems that you point at the fact that the HTML-MagicTemplate distribution
contains the Text::MagicTemplate module. This is not true: in the
HTML-MagicTemplate distribution there is just the HTML/MagicTemplate.pm file,
however in the HTML/MagicTemplate.pm file there is also a package declaration of
Text::MagicTemplate, and I guess this is the real cause of the problem with
CPAN.

The HTML-MagicTemplate distribution should add a couple of autoloaded methods to
the Text::MagicTemplate package, so if you istall HTML-MagicTemplate you will
install the prerequisite for that 2 handlers and you will be able to use that
methods as they where in the Text::MagicTemplate package.

To implement this feature the only way I found was this:

---------- HTML/MagicTemplate.pm START ---------------
package HTML::MagicTemplate          ;

[some HTML::MagicTemplate methods]

package Text::MagicTemplate ;

# predeclaration
sub HTML_VALUE_HANDLERS ;
sub TableTiler          ;
sub FillInForm          ;

1;

__END__

# autosplitted/autoloaded methods

sub HTML_VALUE_HANDLERS
{
.. bla bla
}

sub TableTiler
{
.. bla bla
}

sub FillInForm
{
.. bla bla
}

---------- HTML/MagicTemplate.pm END ---------------

If you install it locally (i.e. without CPAN) the AutoSplit will add the
aoutoloaded method in the auto/Text/MagicTemplate directory, and this is what I
need.

The problem is that CPAN scans the HTML/MagicTemplate.pm, finds the
Text::MagicTemplate package declaration, and 'thinks' that after that
declaration there is the real module, completely ignoring that the module has
its own .pm file and Makemaker.PL file.

To have the 2 methods splitted in the correct directory (i.e.
auto/Text/MagicTemplate) AND avoiding the CPAN mismatch I should try 2 possible
options:

1. finding an alternatiwe way to autosplit the files in the correct dir
2. finding some 'directive' to instruct CPAN to do avoid the mismatch

I have no clue for both the possibilities :-(.
Does anybody know how to do?

Thank you again

Domizio Demichelis

Reply via email to