Thread: [Arsperl-devel] ARSperl package structure changes
Brought to you by:
jeffmurphy
From: Thilo S. <thi...@ap...> - 2009-03-31 19:53:09
|
Hi all, I'd like to make a reorganization to the directory structure of the ARSperl package which might not be entirely backwards compatible, especially concerning the OO-Modules, so I want to discuss it here first. I've always regarded it as rather bad practice that ARSperl installs sol many files directly into the "site/lib" directory. In my opinion there should only be ARS.pm and an "ARS/" subdirectory containing everything else. So what I'd like to do is moving the following files to the "ARS/" subdirectory: ARSar-h.pm ARSarerrno-h.pm ARSnparm.pm ARSnt-h.pm ARSnterrno-h.pm ARSOOform.pm ARSOOmsgs.pm ARSOOsup.pm artypes.ph _h2ph_pre.ph thereby changing the filenames to "ARS/ar-h.pm", "ARS/arerrno.pm" etc. I'll try to make this as backwards compatible as possible, which might not be entirely feasible for the OO-Modules, so users might have to change their code from "new ARS(...)" to something like "new ARS::OO(...)". Does anyone know what "_h2ph_pre.ph" and "artypes.ph" are about? They are "require"d by most of the .pm modules, but only contain the code "1;", which doesn't seem to make sense. I'd like to get rid of them altogether unless there is a reason for their existence. Regards, Thilo |
From: jeff m. <jcm...@je...> - 2009-03-31 20:04:51
Attachments:
smime.p7s
|
On Mar 31, 2009, at 3:52 PM, Thilo Stapff wrote: > Hi all, > > I'd like to make a reorganization to the directory structure of the > ARSperl package which might not be entirely backwards compatible, > especially concerning the OO-Modules, so I want to discuss it here > first. > > I've always regarded it as rather bad practice that ARSperl installs > sol > many files directly into the "site/lib" directory. In my opinion there > should only be ARS.pm and an "ARS/" subdirectory containing everything > else. So what I'd like to do is moving the following files to the > "ARS/" > subdirectory: > > ARSar-h.pm > ARSarerrno-h.pm > ARSnparm.pm > ARSnt-h.pm > ARSnterrno-h.pm > ARSOOform.pm > ARSOOmsgs.pm > ARSOOsup.pm > artypes.ph > _h2ph_pre.ph > > thereby changing the filenames to "ARS/ar-h.pm", "ARS/arerrno.pm" etc. > > I'll try to make this as backwards compatible as possible, which might > not be entirely feasible for the OO-Modules, so users might have to > change their code from "new ARS(...)" to something like "new > ARS::OO(...)". sounds OK to me, if the change is minimal to user code. > > Does anyone know what "_h2ph_pre.ph" and "artypes.ph" are about? They > are "require"d by most of the .pm modules, but only contain the code > "1;", which doesn't seem to make sense. I'd like to get rid of them > altogether unless there is a reason for their existence. > http://www.arsperl.org/manual/OO/form.html#setSort The "ARS::AR_SORT_ASCENDING" business comes from those files. Those files are supposedly to be generated by Makefile.PL during the build process. The intention is to give people mnemonic access to header constants without having them rely on "ars_export(..., 1 | 2 | 8 | 4096)" messiness. > > Regards, > Thilo > > > > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Arsperl-devel mailing list > Ars...@ar... > https://lists.sourceforge.net/lists/listinfo/arsperl-devel |
From: Thilo S. <thi...@ap...> - 2009-04-01 07:58:26
|
> > The "ARS::AR_SORT_ASCENDING" business comes from those files. Those > files are supposedly to be generated by Makefile.PL during the build > process. The intention is to give people mnemonic access to header > constants without having them rely on "ars_export(..., 1 | 2 | 8 | > 4096)" messiness. > Are you sure? On my system (Windows XP), "_h2ph_pre.ph" and "artypes.ph" are almost empty. They contain only the statement "1;" so that they can be successfully loaded. The ARS::AR_XXXX_YYYYY constants are defined in ARSar-h.pm (which is also generated by Makefile.PL). Are things generated differently on Unix systems? |
From: Georg G. <ggr...@gm...> - 2009-04-01 08:41:00
|
Hi, h2ph_pre.ph and artypes.ph look the same on my linux workstation in between (1;, with a comment in artypes.ph that you should not remove this hack :D). It would be "cleaner" if you change to ARS.pm and ARS:: modules. I'm not sure about the advantages you'd gain though, except that you have a different package structure then. I don't think that you'll need polymorphism, so you'll probably not gain an advantage out of this. Kind regards, Georg On Wed, Apr 1, 2009 at 9:58 AM, Thilo Stapff <thi...@ap...>wrote: > > > > The "ARS::AR_SORT_ASCENDING" business comes from those files. Those > > files are supposedly to be generated by Makefile.PL during the build > > process. The intention is to give people mnemonic access to header > > constants without having them rely on "ars_export(..., 1 | 2 | 8 | > > 4096)" messiness. > > > > Are you sure? On my system (Windows XP), "_h2ph_pre.ph" and "artypes.ph" > are almost empty. They contain only the statement "1;" so that they can > be successfully loaded. The ARS::AR_XXXX_YYYYY constants are defined in > ARSar-h.pm (which is also generated by Makefile.PL). Are things > generated differently on Unix systems? > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Arsperl-devel mailing list > Ars...@ar... > https://lists.sourceforge.net/lists/listinfo/arsperl-devel > |
From: Thilo S. <thi...@ap...> - 2009-04-01 11:53:42
|
Georg Grabler wrote: > Hi, > > h2ph_pre.ph <http://h2ph_pre.ph> and artypes.ph <http://artypes.ph> look > the same on my linux workstation in between (1;, with a comment in > artypes.ph <http://artypes.ph> that you should not remove this hack :D). That's exactly the same as on my system. There's also the comment warning about removal, but I can see absolutely no reason *why* it shouldn't be removed. > It would be "cleaner" if you change to ARS.pm and ARS:: modules. I'm not > sure about the advantages you'd gain though, except that you have a > different package structure then. I don't think that you'll need > polymorphism, so you'll probably not gain an advantage out of this. Well, having a cleaner package structure *is* an advantage. Usually there are many other packages installed in "site/lib" and I would be a horrible mess if each of them just dumped a lot files directly into the main directory (one of them might even come with its own "_h2ph_pre.ph" where it would get really ugly). BTW, I think now that the package structure change can probably be implemented fully backwards compatible, without requiring any changes in user code. Regards, Thilo > > Kind regards, > Georg > > On Wed, Apr 1, 2009 at 9:58 AM, Thilo Stapff <thi...@ap... > <mailto:thi...@ap...>> wrote: > > > > > The "ARS::AR_SORT_ASCENDING" business comes from those files. Those > > files are supposedly to be generated by Makefile.PL during the build > > process. The intention is to give people mnemonic access to header > > constants without having them rely on "ars_export(..., 1 | 2 | 8 | > > 4096)" messiness. > > > > Are you sure? On my system (Windows XP), "_h2ph_pre.ph > <http://h2ph_pre.ph>" and "artypes.ph <http://artypes.ph>" > are almost empty. They contain only the statement "1;" so that they can > be successfully loaded. The ARS::AR_XXXX_YYYYY constants are defined in > ARSar-h.pm (which is also generated by Makefile.PL). Are things > generated differently on Unix systems? > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Arsperl-devel mailing list > Ars...@ar... <mailto:Ars...@ar...> > https://lists.sourceforge.net/lists/listinfo/arsperl-devel > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Arsperl-devel mailing list > Ars...@ar... > https://lists.sourceforge.net/lists/listinfo/arsperl-devel |
From: Thilo S. <thi...@ap...> - 2009-04-01 13:28:38
|
> > The "ARS::AR_SORT_ASCENDING" business comes from those files. Those > files are supposedly to be generated by Makefile.PL during the build > process. The intention is to give people mnemonic access to header > constants without having them rely on "ars_export(..., 1 | 2 | 8 | > 4096)" messiness. > In Makefile.PL, the empty artypes.ph is generated from a block with the following condition: if( ($ARSVERSION >= 5.0) && /^nt/ ) { ..... To me it looks like artypes.ph ceased to be relevant with the introduction of ARS 5.0, when the NT API functions where disposed. Since we don't support the 4.X API anymore, artypes.ph can probably be removed, as well as ARSnt-h.pm and ARSnterrno-h.pm. Thilo |
From: jeff m. <jcm...@je...> - 2009-04-01 14:43:18
Attachments:
smime.p7s
|
On Apr 1, 2009, at 3:58 AM, Thilo Stapff wrote: >> > > Are you sure? On my system (Windows XP), "_h2ph_pre.ph" and > "artypes.ph" > are almost empty. They contain only the statement "1;" so that they > can > be successfully loaded. The ARS::AR_XXXX_YYYYY constants are defined > in > ARSar-h.pm (which is also generated by Makefile.PL). Are things > generated differently on Unix systems? > Ah. I think the memory is coming back to me now... :-) # due to the endless confusion over h2ph, i'm including # a known-good copy in the arsperl distribution. the # -d should make it create _h2ph_pre in the current # directory incase you never ran h2ph before (as root) There might even be something in the mail archives about this. When you run h2ph, it'll create _h2ph_pre in the current dir. I then delete that file and replace it with the "1;" file because (I'm assuming) there must have been issues with parsing that file in the past. Instead of fiddling with the ARSar-h.pm file to strip the "require" at the top, I opt'd to replace the contents of _h2ph_pre with a "1;" Most people install Perl and don't run h2ph, so that file (_h2ph_pre) tends not to exist on systems until they install ARSperl (which runs h2ph for them). Basically, my sense is that we can't get rid of that file at this point. However, if you want to re-examine the h2ph process to see if _h2ph_pre can be removed, feel free. You'll need to test it on Windows and at least one Unix for the cases: 1. h2ph was already executed 2. h2ph has never been executed jeff |
From: Thilo S. <thi...@ap...> - 2009-04-01 15:02:01
|
Well, that is pretty much what I found out too. To summarize my results: - we can get rid of "artypes.ph" - it would be too much hassle to remove "_h2ph_pre.ph" - but at least "_h2ph_pre.ph" can be moved to the "ARS/" subdirectory where it won't bother anyone. The next check-in will be up on SourceForge very soon. Thilo jeff murphy wrote: > > On Apr 1, 2009, at 3:58 AM, Thilo Stapff wrote: >>> >> >> Are you sure? On my system (Windows XP), "_h2ph_pre.ph" and "artypes.ph" >> are almost empty. They contain only the statement "1;" so that they can >> be successfully loaded. The ARS::AR_XXXX_YYYYY constants are defined in >> ARSar-h.pm (which is also generated by Makefile.PL). Are things >> generated differently on Unix systems? >> > > > Ah. I think the memory is coming back to me now... :-) > > > # due to the endless confusion over h2ph, i'm including > # a known-good copy in the arsperl distribution. the > # -d should make it create _h2ph_pre in the current > # directory incase you never ran h2ph before (as root) > > There might even be something in the mail archives about this. > > When you run h2ph, it'll create _h2ph_pre in the current dir. I then > delete that file and replace it with the "1;" file because (I'm > assuming) there must have been issues with parsing that file in the > past. Instead of fiddling with the ARSar-h.pm file to strip the > "require" at the top, I opt'd to replace the contents of _h2ph_pre with > a "1;" Most people install Perl and don't run h2ph, so that file > (_h2ph_pre) tends not to exist on systems until they install ARSperl > (which runs h2ph for them). > > Basically, my sense is that we can't get rid of that file at this point. > However, if you want to re-examine the h2ph process to see if _h2ph_pre > can be removed, feel free. You'll need to test it on Windows and at > least one Unix for the cases: > > 1. h2ph was already executed > 2. h2ph has never been executed > > > jeff > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Arsperl-devel mailing list > Ars...@ar... > https://lists.sourceforge.net/lists/listinfo/arsperl-devel |
From: Michiel B. <mi...@be...> - 2009-04-01 16:45:59
|
If you can wait a few more days, tomorrow I want to have finished updating the documentation and examples. Regards, Michiel Beijen Software Consultant +31 6 457 42 418 Bee Free IT + http://beefreeit.nl On Apr 1, 2009 5:02 PM, "Thilo Stapff" <thi...@ap...> wrote: Well, that is pretty much what I found out too. To summarize my results: - we can get rid of "artypes.ph" - it would be too much hassle to remove "_h2ph_pre.ph" - but at least "_h2ph_pre.ph" can be moved to the "ARS/" subdirectory where it won't bother anyone. The next check-in will be up on SourceForge very soon. Thilo jeff murphy wrote: > > On Apr 1, 2009, at 3:58 AM, Thilo Stapff wrote: >>> >> >> Are you sure? On... > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > ______________... |
From: Thilo S. <thi...@ap...> - 2009-04-01 17:11:58
|
I'm talking about the CVS check-in (which is already committed), not about the release (which would be Jeff's part). Anyway, I'm still not completely done with ars_GetListEntryWithMultiSchemaFields. Regards, Thilo Michiel Beijen wrote: > If you can wait a few more days, tomorrow I want to have finished > updating the documentation and examples. > > Regards, > > Michiel Beijen > Software Consultant > +31 6 457 42 418 > Bee Free IT + http://beefreeit.nl > > On Apr 1, 2009 5:02 PM, "Thilo Stapff" <thi...@ap... > <mailto:thi...@ap...>> wrote: > > Well, that is pretty much what I found out too. To summarize my results: > > - we can get rid of "artypes.ph <http://artypes.ph>" > - it would be too much hassle to remove "_h2ph_pre.ph > <http://h2ph_pre.ph>" > - but at least "_h2ph_pre.ph <http://h2ph_pre.ph>" can be moved to > the "ARS/" subdirectory > where it won't bother anyone. > > The next check-in will be up on SourceForge very soon. > > > Thilo > > jeff murphy wrote: > > On Apr 1, 2009, at 3:58 AM, Thilo Stapff > wrote: >>> >> >> Are you sure? On... > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------------ > > > > > > ------------------------------------------------------------------------ > > > ______________... > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Arsperl-devel mailing list > Ars...@ar... > https://lists.sourceforge.net/lists/listinfo/arsperl-devel |
From: Georg G. <ggr...@gm...> - 2009-04-15 11:41:23
|
Oh, I just checked some distributions. Most of them don't run h2ph, not in the perl-packages install routines, and not even at the system setup. Seems as if you're right with keeping that one... 2009/4/1 jeff murphy <jcm...@je...> > > # due to the endless confusion over h2ph, i'm including > # a known-good copy in the arsperl distribution. the > # -d should make it create _h2ph_pre in the current > # directory incase you never ran h2ph before (as root) > > |