[freeside-devel] Documentation

Systems Administrator sysadmin at sunet.com.au
Mon Oct 20 20:43:57 PDT 2003


On Mon, 20 Oct 2003 ivan at 420.am wrote:

> On Mon, Oct 20, 2003 at 03:08:53PM +1000, Systems Administrator wrote:
> > On Sun, 19 Oct 2003 ivan at 420.am wrote:
> > 
> > > tablename.pm modules can declare their schema information in a variable,
> > > like their "table" subroutine, or as a (package) global.
> > 
> > 	Ok, I'm fine with that.  Does that mean that the new fs_setup will 
> > use all the tablename.pm modules?  
> 
> fs-setup is 1.4 and is not being used.  freeside-setup is 1.5 and is
> what would be modified here.

	Ok, think I've got that :).  

> Search for and use, yes.  Anything all-lowercase is a database class.

	Ok, I'll keep that in mind.  

> > > > 2.	Aside from how we encapsulate it (ie. 1 above), what would you 
> > > > 	prefer here?  Perl data structures?  SQL?  Something that works 
> > > > 	with POD?  Or some non-standard entirely new thing?  Or something 
> > > > 	else that I'm unaware of?  HTML?  XML?  
> > > 
> > > "Perl data structures".  Take a look at DBIx::DBSchema.  pretty_print
> > > and pretty_read are close, but probably need to use a hashref for each
> > > column instead of throwing six elements for each column into a giant
> > > array, and also need to be factored down into DBSchema/Table.pm so we
> > > can work with a structure for an individual table, not just for the
> > > whole schema.
> > 
> > 	So, roughly, in agent::table, you'd have something like:
> 
> Yup.

	Good.  I'll look at getting to work.  You said to use diff -u for 
the doco -- can I just pull the file down from the web CVS and use the 
standard Unix diff utility?  I haven't learned CVS yet :).  

> > foreach $field(@$schema->columns) {
> > 	if(! defined($field->length)) { $field->length = 80; }
> > }
> 
> I'd forget this, though, and specify lengths explicitly like we do now.

	Ok.  

> > 	Also, did you have anywhere where you wanted the links between the 
> > tables documented?
> 
> It wouldn't be a bad idea to make foreign key relationships available.

	That's pretty much what I was thinking.  

> >  And are you using PostgreSQL's views anywhere?  
> 
> No, we're still working under the delusion that MySQL could be
> supported again someday (not that anyone has done any work on it in
> ages).

	Right.  I've been playing with PostgreSQL views and plperl 
recently for another project, and they have some cool bits.  Maybe we 
should substitute the delusion that MySQL will someday support views and 
plperl :).  

	Anyway, thanks for the answers :).  That should give me enough to 
go on for now :).  

-- 
Tim Nelson
Systems Administrator
Sunet Internet
Tel: +61 3 5241 1155
Fax: +61 3 5241 6187
Web: http://www.sunet.com.au/
Email: sysadmin at sunet.com.au





More information about the freeside-devel mailing list