Astro::STSDAS::Table::Columns - Container for table columns
use Astro::STSDAS::Table::Columns;
Astro::STSDAS::Table::Columns is a container for a set of Astro::STSDAS::Table::Column objects.
Column names are stored as mixed case, but case is ignored when searching by name. All methods which return column names return them as stored (i.e. in mixed case).
$cols = Astro::STSDAS::Table::Columns->new;
The constructor. It takes no arguments.
$ncols = $cols->ncols
The number of columns in the container
$newcol = $cols->add( ... )
Add a column to the container. It takes the same arguments as the Astro::STSDAS::Table::Column constructor. It returns a reference to the new column object.
$cols->del( $col )
Delete the passed Astro::STSDAS::Table::Column object from the container. It returns 1 if successful, 0 if not.
1
0
Delete the named column from the container. It returns 1 if successful, 0 if not.
$col = $cols->byidx( $idx );
return the column with the specified zero-based index in the list of columns.
$col = $cols->byname( $name );
return the column with the specified name.
@cols = $cols->cols;
returns a list of the columns (as Astro::STSDAS::Table::Column objects) sorted on column index.
@names = $cols->names;
returns a list of column names, sorted on column index.
$cols->rename( $oldname, $newname );
Rename the named column. It is important to use this method rather than a column's name method, to ensure the integrity of the container.
$new_cols = $cols->copy;
This returns a new Astro::STSDAS::Table::Columns object which is a copy of the current object. The contained Astro::STSDAS::Table::Column objects are copies of the originals.
None by default.
This software is released under the GNU General Public License. You may find a copy at
http://www.fsf.org/copyleft/gpl.html
Diab Jerius (djerius@cpan.org)
Astro::STSDAS::Table, Astro::STSDAS::Table::Column, perl(1).
To install Astro::STSDAS::Table::Base, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Astro::STSDAS::Table::Base
CPAN shell
perl -MCPAN -e shell install Astro::STSDAS::Table::Base
For more information on module installation, please visit the detailed CPAN module installation guide.