Re: [Mason] subcomponents

2017-01-09 Thread Hiram Gibbard
I see now. Yes, there is a block of code b/n the def tag. Thanks. Now I understand. I can decipher that code to see what the issue is. Thanks a mil! Sent from my iPhone > On Jan 9, 2017, at 3:32 PM, William Cox wrote: > > the subcomponent will be entirely contained within the <%def> tags. >

Re: [Mason] subcomponents

2017-01-09 Thread Seb
Hi, > i do have the <%def .is_valid_sshkey> defined, but where is the code > embedded? Between <%def .is_valid_sshkey> and . > is the logic for is_valid_sshkey built on the fly, if so, where is it > getting the sub-component set of rules? Presumably from above, in the same file. > I'm sear

Re: [Mason] subcomponents

2017-01-09 Thread William Cox
the subcomponent will be entirely contained within the <%def> tags. within that, many of the same rules apply as to file-level components quote: Each instance of this section creates a *subcomponent* embedded inside the current component. Inside you may place anything that a regular component conta

Re: [Mason] subcomponents

2017-01-09 Thread Hiram Gibbard
i do have the <%def .is_valid_sshkey> defined, but where is the code embedded? I also executed a recursive/case insensitive search in all the application code files for "is_valid_sshkey" and nothing was returned outside of what I've already seen. is the logic for is_valid_sshkey built on the fly,

Re: [Mason] subcomponents

2017-01-09 Thread William Cox
Hiram, you likely are dealing with a call to an embedded component: https://metacpan.org/pod/distribution/HTML-Mason/lib/HTML/Mason/Devel.pod#EMBEDDED-COMPONENTS the ".is_valid_sshkey" should be found as <%def .is_valid_subkey>...<%/def> within the same file On Mon, Jan 9, 2017 at 4:10 PM Seb w

Re: [Mason] subcomponents

2017-01-09 Thread Seb
Hi, > thanks for that Seb, but what if I'm not finding a file called > .is_valid_sshkey? > > using: > sudo find / -type f -iname ".is_valid_sshkey" -ls There could be a suffix, such as .mas, which would not be found with your syntax. Example: >mkdir toto >touch toto/.hidden >find . -type f -

Re: [Mason] subcomponents

2017-01-09 Thread Seb
Hi Hiram, my $is_valid = $m->comp(".is_valid_sshkey", sshkey => $ssh2, uidnumber => $employeeNumber, ); As I understand it, this is a mason subcomponent, but what isn't clear to me is the ".is_valid_sshkey" The line means to use a Mason component whose code resides in the file named ".is

Re: [Mason] subcomponents

2017-01-09 Thread Hiram Gibbard
thanks for that Seb, but what if I'm not finding a file called .is_valid_sshkey? using: sudo find / -type f -iname ".is_valid_sshkey" -ls On Mon, Jan 9, 2017 at 2:47 PM, Seb wrote: > > Hi Hiram, > > > my $is_valid = $m->comp(".is_valid_sshkey", sshkey => $ssh2, uidnumber => >> $employeeNumber,

[Mason] subcomponents

2017-01-09 Thread Hiram Gibbard
Hi, Trying to decifer this statment: my $is_valid = $m->comp(".is_valid_sshkey", sshkey => $ssh2, uidnumber => $employeeNumber, ); As I understand it, this is a mason subcomponent, but what isn't clear to me is the ".is_valid_sshkey" is is_valid_sshkey supposed to be defined somewhere like a fu

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Perrin Harkins
On Tue, Dec 2, 2008 at 5:49 PM, Shane McCarron <[EMAIL PROTECTED]> wrote: > In looking at the mod_perl 2 documentation, I see that using a SetHandler > perl-script has very different behavior than using a SetHandler modperl - > could that be related at all? Yes. Quoting the docs: Several special

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Shane McCarron
On Tue, Dec 2, 2008 at 4:16 PM, Perrin Harkins <[EMAIL PROTECTED]> wrote: > > Which version of mod_perl are you running? This may be relevant: > http://perl.apache.org/docs/1.0/guide/porting.html#_INC_and_mod_perl In looking at the mod_perl 2 documentation, I see that using a SetHandler perl-sc

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Shane McCarron
On Tue, Dec 2, 2008 at 4:36 PM, Perrin Harkins <[EMAIL PROTECTED]> wrote: > On Tue, Dec 2, 2008 at 5:26 PM, Shane McCarron <[EMAIL PROTECTED]> > wrote: > > While we DO support mod_perl 1, in the case of > > these customers they are both using modern versions of Apache 2 and > mod_perl > > 2. In e

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Perrin Harkins
On Tue, Dec 2, 2008 at 5:26 PM, Shane McCarron <[EMAIL PROTECTED]> wrote: > While we DO support mod_perl 1, in the case of > these customers they are both using modern versions of Apache 2 and mod_perl > 2. In either case, since SOME of our modules compile just fine, and it only > falls over in a

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Alfie John
Hey, As a quick fix, add this to your apache conf: use lib '/your/path/to/lib' Alfie -- Free Dating Australia http://free-dating.com.au On Wed, Dec 3, 2008 at 9:14 AM, Shane McCarron <[EMAIL PROTECTED]> wrote: > > On Tue, Dec 2, 2008 at 4:06 PM, Jonathan Swar

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Shane McCarron
On Tue, Dec 2, 2008 at 4:16 PM, Perrin Harkins <[EMAIL PROTECTED]> wrote: > > Which version of mod_perl are you running? This may be relevant: > http://perl.apache.org/docs/1.0/guide/porting.html#_INC_and_mod_perl Thanks for that pointer. While we DO support mod_perl 1, in the case of these cu

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Shane McCarron
I have included some details of a stack trace in another message. Our custom handler adds items to the @INC list via "use lib". An example would be: BEGIN { require "/var/www/html/atm/config.pl"; use lib "/var/www/html/atm"; use lib "/var/www/html/atm/lib"; use li

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Perrin Harkins
On Tue, Dec 2, 2008 at 4:54 PM, Shane McCarron <[EMAIL PROTECTED]> wrote: > We have a TON of customers using a mason-based app under mod_perl. Two out > of the hundreds are both running into a situation where when a subcomponent > is referenced and that subcomponent has a once block that needs to

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Shane McCarron
On Tue, Dec 2, 2008 at 4:06 PM, Jonathan Swartz <[EMAIL PROTECTED]> wrote: > Can't imagine why this would happen. > Are you doing any component preloading in your custom handler? > We do not. > > Can you look at the object file for one of these components (containing the > subcomponent) and see

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Hans Dieter Pearcey
On Tue, Dec 02, 2008 at 03:54:19PM -0600, Shane McCarron wrote: > So is it possible that subcomponents do not inherit the INC list from > their > parent in some situations? Or is it possible that a subcomponent does another > request via some route that avoids our custom handler? Definitely

Re: [Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Jonathan Swartz
Can't imagine why this would happen. Are you doing any component preloading in your custom handler? Can you look at the object file for one of these components (containing the subcomponent) and see if anything looks out of whack? Where does the 'use' actually end up - inside a subroutine or

[Mason] subcomponents seem to have a different INC list sometimes?

2008-12-02 Thread Shane McCarron
Okay, I know this is going to sound insane... We have a TON of customers using a mason-based app under mod_perl. Two out of the hundreds are both running into a situation where when a subcomponent is referenced and that subcomponent has a once block that needs to do a "use" of something that has