Re: subcomponents
William Cox <[email protected]> Mon, 09 Jan 2017 21:32:13 +0000
| Newsgroups | gmane.comp.web.mason.user |
|---|---|
| Message-ID | <CAN+TG=xeuZOnLTJg-4fH8g34L9USyDq8GXGHs9c5YHoifxkGAA@mail.gmail.com> |
--===============7831503680443186200== Content-Type: multipart/alternative; boundary=94eb2c0a5f7273a8350545b01a13 --94eb2c0a5f7273a8350545b01a13 Content-Type: text/plain; charset=UTF-8 the subcomponent will be entirely contained within the <%def></%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 contains, with the exception of <%def>, <%method>, <%once>, and <%shared> tags. without seeing what that <%def> defines, I can't really say much beyond that as I/we can't see the code you're seeing. that being said, I can say it almost certainly is _not_ being built on the fly (without some black magic). On Mon, Jan 9, 2017 at 4:25 PM Hiram Gibbard <[email protected]> wrote: > 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, if so, where is it > getting the sub-component set of rules? > > basically this application was written awhile ago and i'm trying to figure > out how it validates the ssh keys provided in the text field by the user. > > It works on the old server, yet not the new one. I migrated the app to the > new one from the old one by taring up the entire directory and deploying it > on the new server. > > I'm searching, using grep and find, for "is_valid_sshkey" on both the old > and new servers and can not seem to find any mention of "is_valid_sshkey > other than whats defined for the sub-component and %def. > > Magic? > > On Mon, Jan 9, 2017 at 3:14 PM, William Cox <[email protected]> wrote: > > 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 <[email protected]> wrote: > > > 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 -iname ".hidden" -ls > 217773 0 -rw-r--r-- 1 seb seb 0 Jan 9 22:04 ./toto/.hidden > >find . -type f -iname ".hid" -ls > >find . -type f -iname ".hid*" -ls > 217773 0 -rw-r--r-- 1 seb seb 0 Jan 9 22:04 ./toto/.hidden > > So I suggest you try this: > > sudo find / -type f -iname ".is_valid_sshkey*" -ls > > > Seb. > > > > > > > On Mon, Jan 9, 2017 at 2:47 PM, Seb <[email protected]> wrote: > > > >> > >> 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_valid_sshkey", which could also be written > ./.is_valid_sshkey . > >> You will find this (hidden) file in the same directory as the one from > >> which the code is extracted. > >> > >> > >> Seb. > >> > > > > > > > > > > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > Mason-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mason-users > > -- > William Cox > > e: [email protected] > > -----BEGIN GEEK CODE BLOCK----- > Version: 3.1 > GCS d- s+:+() a C++(++++)$ UBLC(++)$ > P+++(++++)$ L++(+++)$ !E--- W++(+++)$ > !N !o? K--? !w--- !O M++ !V- PS-(--)@ PE+() > Y+ !PGP t++ !5 X+++ !R tv(+) b+>++ > DI+(++) D+() G e h--- r+++ y+++>++++ > ------END GEEK CODE BLOCK------ > > > > > -- > Hiram Gibbard > [email protected] > http://hiramgibbard.com > > -- William Cox e: [email protected] -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d- s+:+() a C++(++++)$ UBLC(++)$ P+++(++++)$ L++(+++)$ !E--- W++(+++)$ !N !o? K--? !w--- !O M++ !V- PS-(--)@ PE+() Y+ !PGP t++ !5 X+++ !R tv(+) b+>++ DI+(++) D+() G e h--- r+++ y+++>++++ ------END GEEK CODE BLOCK------ --94eb2c0a5f7273a8350545b01a13 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div><div>the subcomponent will be entirely contained= within the <%def></%def> tags. within that, many of the same r= ules apply as to file-level components<br></div>quote: Each instance of thi= s section creates a <i>subcomponent</i> embedded inside the current compone= nt. Inside you may place anything that a regular component contains, with t= he exception of <code><%def></code>, <code><%method></code>, <c= ode><%once></code>, and <code><%shared></code> tags.<br><br></d= iv>without seeing what that <%def> defines, I can't really say mu= ch beyond that as I/we can't see the code you're seeing.<br><br></d= iv>that being said, I can say it almost certainly is _not_ being built on t= he fly (without some black magic).<br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr">On Mon, Jan 9, 2017 at 4:25 PM Hiram Gibbard <<a href= =3D"mailto:[email protected]">[email protected]</a>> wrote:<br></div><= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex"><div dir=3D"ltr" class=3D"gmail_msg">i do hav= e the <%def .is_valid_sshkey> defined, but where is the code embedded= ?=C2=A0<div class=3D"gmail_msg"><br class=3D"gmail_msg"></div><div class=3D= "gmail_msg">I also executed a recursive/case insensitive search in all the = application code files for "is_valid_sshkey" and nothing was retu= rned outside of what I've already seen.</div><div class=3D"gmail_msg"><= br class=3D"gmail_msg"></div><div class=3D"gmail_msg">is the logic for is_v= alid_sshkey built on the fly, if so, where is it getting the sub-component = set of rules?</div><div class=3D"gmail_msg"><br class=3D"gmail_msg"></div><= div class=3D"gmail_msg">basically this application was written awhile ago a= nd i'm trying to figure out how it validates the ssh keys provided in t= he text field by the user.=C2=A0</div><div class=3D"gmail_msg"><br class=3D= "gmail_msg"></div><div class=3D"gmail_msg">It works on the old server, yet = not the new one. I migrated the app to the new one from the old one by tari= ng up the entire directory and deploying it on the new server.=C2=A0</div><= div class=3D"gmail_msg"><br class=3D"gmail_msg"></div><div class=3D"gmail_m= sg">I'm searching, using grep and find, for "is_valid_sshkey"= on both the old and new servers and can not seem to find any mention of &q= uot;is_valid_sshkey other than whats defined for the sub-component and %def= .</div><div class=3D"gmail_msg"><br class=3D"gmail_msg"></div><div class=3D= "gmail_msg">Magic?=C2=A0</div></div><div class=3D"gmail_extra gmail_msg"></= div><div class=3D"gmail_extra gmail_msg"><br class=3D"gmail_msg"><div class= =3D"gmail_quote gmail_msg">On Mon, Jan 9, 2017 at 3:14 PM, William Cox <spa= n dir=3D"ltr" class=3D"gmail_msg"><<a href=3D"mailto:[email protected]= om" class=3D"gmail_msg" target=3D"_blank">[email protected]</a>></sp= an> wrote:<br class=3D"gmail_msg"><blockquote class=3D"gmail_quote gmail_ms= g" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">= <div dir=3D"ltr" class=3D"gmail_msg"><div class=3D"gmail_msg"><div class=3D= "gmail_msg">Hiram,<br class=3D"gmail_msg"><br class=3D"gmail_msg"></div>you= likely are dealing with a call to an embedded component: <a href=3D"https:= //metacpan.org/pod/distribution/HTML-Mason/lib/HTML/Mason/Devel.pod#EMBEDDE= D-COMPONENTS" class=3D"gmail_msg" target=3D"_blank">https://metacpan.org/po= d/distribution/HTML-Mason/lib/HTML/Mason/Devel.pod#EMBEDDED-COMPONENTS</a><= br class=3D"gmail_msg"><br class=3D"gmail_msg"></div>the ".is_valid_ss= hkey" should be found as <%def .is_valid_subkey>...<%/def>= within the same file<br class=3D"gmail_msg"></div><br class=3D"gmail_msg">= <div class=3D"gmail_quote gmail_msg"><div dir=3D"ltr" class=3D"gmail_msg">O= n Mon, Jan 9, 2017 at 4:10 PM Seb <<a href=3D"mailto:[email protected]" class= =3D"gmail_msg" target=3D"_blank">[email protected]</a>> wrote:<br class=3D"gmai= l_msg"></div><blockquote class=3D"gmail_quote gmail_msg" style=3D"margin:0 = 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class=3D"m_-34955= 40569299768337m_1562687531559746731gmail_msg gmail_msg"> Hi,<br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_= msg"> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> > thanks for that Seb, but what if I'm not finding a file called<br = class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg"> > .is_valid_sshkey?<br class=3D"m_-3495540569299768337m_1562687531559746= 731gmail_msg gmail_msg"> ><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail= _msg"> > using:<br class=3D"m_-3495540569299768337m_1562687531559746731gmail_ms= g gmail_msg"> > sudo find / -type f -iname ".is_valid_sshkey" -ls<br class= =3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg"> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> There could be a suffix, such as .mas, which would not be found with your<b= r class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg"> syntax. Example:<br class=3D"m_-3495540569299768337m_1562687531559746731gma= il_msg gmail_msg"> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> >mkdir toto<br class=3D"m_-3495540569299768337m_1562687531559746731gmail= _msg gmail_msg"> >touch toto/.hidden<br class=3D"m_-3495540569299768337m_1562687531559746= 731gmail_msg gmail_msg"> >find . -type f -iname ".hidden" -ls<br class=3D"m_-3495540569= 299768337m_1562687531559746731gmail_msg gmail_msg"> 217773=C2=A0 =C2=A0 0 -rw-r--r--=C2=A0 =C2=A01 seb=C2=A0 =C2=A0 =C2=A0 seb= =C2=A0 =C2=A00 Jan=C2=A0 9 22:04 ./toto/.hidden<br class=3D"m_-349554056929= 9768337m_1562687531559746731gmail_msg gmail_msg"> >find . -type f -iname ".hid" -ls<br class=3D"m_-3495540569299= 768337m_1562687531559746731gmail_msg gmail_msg"> >find . -type f -iname ".hid*" -ls<br class=3D"m_-349554056929= 9768337m_1562687531559746731gmail_msg gmail_msg"> 217773=C2=A0 =C2=A0 0 -rw-r--r--=C2=A0 =C2=A01 seb=C2=A0 =C2=A0 =C2=A0 seb= =C2=A0 =C2=A00 Jan=C2=A0 9 22:04 ./toto/.hidden<br class=3D"m_-349554056929= 9768337m_1562687531559746731gmail_msg gmail_msg"> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> So I suggest you try this:<br class=3D"m_-3495540569299768337m_156268753155= 9746731gmail_msg gmail_msg"> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> sudo find / -type f -iname ".is_valid_sshkey*" -ls<br class=3D"m_= -3495540569299768337m_1562687531559746731gmail_msg gmail_msg"> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> Seb.<br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail= _msg"> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> ><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail= _msg"> > On Mon, Jan 9, 2017 at 2:47 PM, Seb <<a href=3D"mailto:[email protected]" = class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg" ta= rget=3D"_blank">[email protected]</a>> wrote:<br class=3D"m_-349554056929976833= 7m_1562687531559746731gmail_msg gmail_msg"> ><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail= _msg"> >><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg g= mail_msg"> >> Hi Hiram,<br class=3D"m_-3495540569299768337m_1562687531559746731g= mail_msg gmail_msg"> >><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg g= mail_msg"> >><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg g= mail_msg"> >> my $is_valid =3D $m->comp(".is_valid_sshkey", sshkey = =3D> $ssh2, uidnumber =3D><br class=3D"m_-3495540569299768337m_156268= 7531559746731gmail_msg gmail_msg"> >>> $employeeNumber, );<br class=3D"m_-3495540569299768337m_156268= 7531559746731gmail_msg gmail_msg"> >>><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_m= sg gmail_msg"> >>> As I understand it, this is a mason subcomponent, but what isn= 't clear to<br class=3D"m_-3495540569299768337m_1562687531559746731gmai= l_msg gmail_msg"> >>> me is the ".is_valid_sshkey"<br class=3D"m_-34955405= 69299768337m_1562687531559746731gmail_msg gmail_msg"> >>><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_m= sg gmail_msg"> >><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg g= mail_msg"> >> The line means to use a Mason component whose code resides in the = file<br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail= _msg"> >> named ".is_valid_sshkey", which could also be written ./= .is_valid_sshkey .<br class=3D"m_-3495540569299768337m_1562687531559746731g= mail_msg gmail_msg"> >> You will find this (hidden) file in the same directory as the one = from<br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail= _msg"> >> which the code is extracted.<br class=3D"m_-3495540569299768337m_1= 562687531559746731gmail_msg gmail_msg"> >><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg g= mail_msg"> >><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg g= mail_msg"> >> Seb.<br class=3D"m_-3495540569299768337m_1562687531559746731gmail_= msg gmail_msg"> >><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg g= mail_msg"> ><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail= _msg"> ><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail= _msg"> ><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail= _msg"> ><br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail= _msg"> <br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_msg= "> ---------------------------------------------------------------------------= ---<br class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_= msg"> Developer Access Program for Intel Xeon Phi Processors<br class=3D"m_-34955= 40569299768337m_1562687531559746731gmail_msg gmail_msg"> Access to Intel Xeon Phi processor-based developer platforms.<br class=3D"m= _-3495540569299768337m_1562687531559746731gmail_msg gmail_msg"> With one year of Intel Parallel Studio XE.<br class=3D"m_-34955405692997683= 37m_1562687531559746731gmail_msg gmail_msg"> Training and support from Colfax.<br class=3D"m_-3495540569299768337m_15626= 87531559746731gmail_msg gmail_msg"> Order your platform today. <a href=3D"http://sdm.link/xeonphi" rel=3D"noref= errer" class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg gmail_= msg" target=3D"_blank">http://sdm.link/xeonphi</a><br class=3D"m_-349554056= 9299768337m_1562687531559746731gmail_msg gmail_msg"> _______________________________________________<br class=3D"m_-349554056929= 9768337m_1562687531559746731gmail_msg gmail_msg"> Mason-users mailing list<br class=3D"m_-3495540569299768337m_15626875315597= 46731gmail_msg gmail_msg"> <a href=3D"mailto:[email protected]" class=3D"m_-3495540569= 299768337m_1562687531559746731gmail_msg gmail_msg" target=3D"_blank">Mason-= [email protected]</a><br class=3D"m_-3495540569299768337m_1562687= 531559746731gmail_msg gmail_msg"> <a href=3D"https://lists.sourceforge.net/lists/listinfo/mason-users" rel=3D= "noreferrer" class=3D"m_-3495540569299768337m_1562687531559746731gmail_msg = gmail_msg" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/m= ason-users</a><br class=3D"m_-3495540569299768337m_1562687531559746731gmail= _msg gmail_msg"> </blockquote></div><div dir=3D"ltr" class=3D"gmail_msg">-- <br class=3D"gma= il_msg"></div><div data-smartmail=3D"gmail_signature" class=3D"gmail_msg"><= div dir=3D"ltr" class=3D"gmail_msg">William Cox<br class=3D"gmail_msg"><br = class=3D"gmail_msg">e: <a href=3D"mailto:[email protected]" class=3D"gm= ail_msg" target=3D"_blank">[email protected]</a><br class=3D"gmail_msg"= ><br class=3D"gmail_msg">-----BEGIN GEEK CODE BLOCK-----<br class=3D"gmail_= msg">Version: 3.1<br class=3D"gmail_msg">GCS d- s+:+() a C++(++++)$ UBLC(++= )$<br class=3D"gmail_msg">P+++(++++)$ L++(+++)$ !E--- W++(+++)$<br class=3D= "gmail_msg">!N !o? K--? !w--- !O M++ !V- PS-(--)@ PE+()<br class=3D"gmail_m= sg">Y+ !PGP t++ !5 X+++ !R tv(+) b+>++<br class=3D"gmail_msg">DI+(++) D+= () G e h--- r+++ y+++>++++<br class=3D"gmail_msg">------END GEEK CODE BL= OCK------<br class=3D"gmail_msg"></div></div> </blockquote></div><br class=3D"gmail_msg"><br clear=3D"all" class=3D"gmail= _msg"><div class=3D"gmail_msg"><br class=3D"gmail_msg"></div></div><div cla= ss=3D"gmail_extra gmail_msg">-- <br class=3D"gmail_msg"><div class=3D"m_-34= 95540569299768337gmail_signature gmail_msg" data-smartmail=3D"gmail_signatu= re"><div dir=3D"ltr" class=3D"gmail_msg"><div class=3D"gmail_msg">Hiram Gib= bard<br class=3D"gmail_msg"><a href=3D"mailto:[email protected]" class=3D"= gmail_msg" target=3D"_blank">[email protected]</a></div><div class=3D"gmai= l_msg"><a href=3D"http://hiramgibbard.com" class=3D"gmail_msg" target=3D"_b= lank">http://hiramgibbard.com</a></div><div class=3D"gmail_msg"><br class= =3D"gmail_msg"><div style=3D"display:inline" class=3D"gmail_msg"></div></di= v></div></div> </div></blockquote></div><div dir=3D"ltr">-- <br></div><div data-smartmail= =3D"gmail_signature"><div dir=3D"ltr">William Cox<br><br>e: <a href=3D"mail= to:[email protected]">[email protected]</a><br><br>-----BEGIN GEEK = CODE BLOCK-----<br>Version: 3.1<br>GCS d- s+:+() a C++(++++)$ UBLC(++)$<br>= P+++(++++)$ L++(+++)$ !E--- W++(+++)$<br>!N !o? K--? !w--- !O M++ !V- PS-(-= -)@ PE+()<br>Y+ !PGP t++ !5 X+++ !R tv(+) b+>++<br>DI+(++) D+() G e h---= r+++ y+++>++++<br>------END GEEK CODE BLOCK------<br></div></div> --94eb2c0a5f7273a8350545b01a13-- --===============7831503680443186200== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi --===============7831503680443186200== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Mason-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mason-users --===============7831503680443186200==--