Here it the patch to get rid of the warning. It just tests if
$self->owner->path is defined before using it to create the contents
$self->{path} so it is very simple and it cannot broke anything.

Cheers,
  Javier


El lun, 05-05-2008 a las 10:59 -0700, BenRifkah Bergsten-Buret escribió:
> Greetings Javier,
> 
> Since the warnings are coming from the mason library there is no clean
> way for you to get rid of the messages within your web code.  The best
> way to remove the warnings is to fix the mason library as Raymond
> suggested.  If you modify the library and then send a patch to the
> list it can be incorporated as a fix and everyone benefits.
> 
> If you don't feel comfortable with this or don't have the time to fix
> it I would report it as a bug to the mason development list and
> hopefully someone there can work on it.
> 
> If you really want to get rid of the warnings and you absolutely can't
> modify the mason source code (because it's shared or you don't have
> permission) you can try to employ a hack on your system.  However, if
> you try to do this you'll end up doing more work that it would take
> you to submit a patch.
> 
> -- Ben
> 
> On Sun, May 4, 2008 at 11:55 PM, Javier Amor García
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >   is not practical for me to add an undefined test because the
> >  concatenation is done inside the mason library.
> >   I would like to know from where the undefined value comes but, as the
> >  component works as expected, more important to me now is to remove those
> >  annoying warnings.
> >
> >  Cheers,
> >   Javie
> >
> >
> >  El sáb, 03-05-2008 a las 10:34 +0900, Raymond Wan escribió:
> >  > Hi Javier,
> >  >
> >  > Javier Amor García wrote:
> >  > > I have looked to the Subcomponent.pm code and the exact line is this:
> >  > >     $self->{path} = $self->owner->path . ":" . $self->name;
> >  > >
> >  > > Debuging a little I have seen that the undefined value comes from
> >  > > $self->owner->path; ($self->name have the correct value)
> >  > >
> >  > >
> >  > > Somebody can help me to get rid of this warnings?
> >  > >
> >  >
> >  >
> >  > I don't understand...you seemed more concerned about getting rid of the
> >  > warning and less concerned about why $self->owner->path is always
> >  > undefined :-) .  You're essentially concatenating to an undefined
> >  > value.  Why don't you add a test to see if it is defined and concatenate
> >  > only of it is?
> >  >
> >  > Ray
> >  >
> >  >
> >
> >
> >  -------------------------------------------------------------------------
> >  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> >  Don't miss this year's exciting event. There's still time to save $100.
> >  Use priority code J8TL2D2.
> >  
> > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >  _______________________________________________
> >  Mason-users mailing list
> >  Mason-users@lists.sourceforge.net
> >  https://lists.sourceforge.net/lists/listinfo/mason-users
> >
--- HTML/Mason/Component/Subcomponent.pm.old	2008-05-12 12:33:19.000000000 +0200
+++ HTML/Mason/Component/Subcomponent.pm	2008-05-12 12:39:29.000000000 +0200
@@ -31,7 +31,8 @@
     $self->SUPER::assign_runtime_properties($interp, $source);
     $self->{comp_id} = sprintf("[%s '%s' of %s]", $self->{is_method} ? 'method' : 'subcomponent',
                                $self->name, $self->owner->comp_id);
-    $self->{path} = $self->owner->path . ":" . $self->name;
+    $self->{path} = (defined $self->owner->path) ? $self->owner->path : '';
+    $self->{path} .=  ":" . $self->name;
 }
 
 sub cache_file { return $_[0]->owner->cache_file }
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to