Mac::Apps::Seasonality::Constants - Static definitions of aspects of Seasonality.



NAME

Mac::Apps::Seasonality::Constants - Static definitions of aspects of Seasonality.


VERSION

This document describes Mac::Apps::Seasonality::Constants version 1.0.1.


SYNOPSIS

    use Mac::Apps::Seasonality::Constants qw{
        $SEASONALITY_NAME
        $SEASONALITY_CREATOR
        $SEASONALITY_HISTORY_DATABASE_PATH
    };
    use Mac::Apps::Seasonality::Constants qw{
        $SEASONALITY_HISTORY_TABLE
        $SEASONALITY_HISTORY_COLUMN_ICAO
        $SEASONALITY_HISTORY_COLUMN_TEMPERATURE_C
    };
    use Mac::Apps::Seasonality::Constants qw{
        $SEASONALITY_DB_STATUS_TABLE
        $SEASONALITY_DB_STATUS_COLUMN_NEW_RECORDS_SINCE_VACUUM
    };
    use Mac::Apps::Seasonality::Constants qw{
        $SEASONALITY_HISTORY_COLUMNS_REF
        $SEASONALITY_HISTORY_COLUMN_NUMBERS_BY_COLUMN_NAME_REF
        $SEASONALITY_HISTORY_COLUMN_NAMES_BY_COLUMN_NUMBER_REF
    };
    use Mac::Apps::Seasonality::Constants qw{
        $SEASONALITY_INVALID_DATA
        $SEASONALITY_TEMPERATURE_MINIMUM
        $SEASONALITY_TEMPERATURE_MAXIMUM
    };
    use Mac::Apps::Seasonality::Constants qw{ :all };
    use Mac::Apps::Seasonality::Constants qw{ :application };
    use Mac::Apps::Seasonality::Constants qw{ :database };
    use Mac::Apps::Seasonality::Constants qw{ :data };


DESCRIPTION

This provides static metadata about Seasonality via ``constants''. The exposed values are made immutable via the Readonly manpage and not the constant manpage, so they are usable within string interpolation, etc.

None of the values are exported by default to avoid the possibility of name clashes, though the names should be unique enough for most uses. Each value must individually be imported or with one of the following tags:

:all
All constants.

:application
The application name and creator code. The name of and default path to the weather history database.

:database
The database table and column names.

:data
The missing data indicator value and the limits on each type of data.


INTERFACE

General Information

$SEASONALITY_NAME
The name of the application. Defined so that there's one central place for this in case it needs to be enhanced/changed in the future.

$SEASONALITY_CREATOR
The MacOS creator code for the application.

Database and Tables

$SEASONALITY_HISTORY_DATABASE_NAME
The name of the SQLite database file that the historical data is stored in. Note that this is just the basename, and does not contain any path components.

$SEASONALITY_HISTORY_DATABASE_PATH
The path of the default location of the SQLite database file that the historical data is stored in.

$SEASONALITY_HISTORY_TABLE
The name of the database table that the historical ICAO data is stored in.

$SEASONALITY_DB_STATUS_TABLE
The name of the database table that the overall database health is kept in.

Table Columns

$SEASONALITY_HISTORY_COLUMN_ICAO, $SEASONALITY_HISTORY_COLUMN_DATE, $SEASONALITY_HISTORY_COLUMN_WIND_DIRECTION, $SEASONALITY_HISTORY_COLUMN_WIND_SPEED_KNOTS, $SEASONALITY_HISTORY_COLUMN_GUST_SPEED_KNOTS, $SEASONALITY_HISTORY_COLUMN_VISIBILITY_MILES, $SEASONALITY_HISTORY_COLUMN_TEMPERATURE_C, $SEASONALITY_HISTORY_COLUMN_DEWPOINT_C, $SEASONALITY_HISTORY_COLUMN_PRESSURE_HPA, $SEASONALITY_HISTORY_COLUMN_RELATIVE_HUMIDITY
The individual column names in the history table.

$SEASONALITY_DB_STATUS_COLUMN_NEW_RECORDS_SINCE_VACUUM
The individual column names in the database status table.

$SEASONALITY_HISTORY_COLUMNS_REF
Reference to an array of the names of the history table columns, in database schema order.

$SEASONALITY_HISTORY_COLUMN_NUMBERS_BY_COLUMN_NAME_REF
Reference to a hash mapping from column numbers to history column names.

$SEASONALITY_HISTORY_COLUMN_NAMES_BY_COLUMN_NUMBER_REF
Reference to a hash mapping from history column names to column numbers.

Data Limits

$SEASONALITY_INVALID_DATA
The numeric value that is used to denote the data from the source is missing or invalid.

$SEASONALITY_ICAO_MINIMUM_LENGTH, $SEASONALITY_ICAO_MAXIMUM_LENGTH
The range of valid sizes for ICAOs.

$SEASONALITY_TEMPERATURE_MINIMUM, $SEASONALITY_TEMPERATURE_MAXIMUM
The range of valid temperatures, in °C.

$SEASONALITY_WIND_DIRECTION_MINIMUM, $SEASONALITY_WIND_DIRECTION_MAXIMUM
The range of valid wind directions, in compass degrees. -1 indicates ``variable''.

$SEASONALITY_WIND_SPEED_MINIMUM, $SEASONALITY_WIND_SPEED_MAXIMUM
The range of valid wind speeds, in knots.

$SEASONALITY_VISIBILITY_MINIMUM, $SEASONALITY_VISIBILITY_MAXIMUM
The range of valid visibilities, in miles.

$SEASONALITY_PRESSURE_MINIMUM, $SEASONALITY_PRESSURE_MAXIMUM
The range of valid atmospheric pressures, in millibars/heptopascals.


DIAGNOSTICS

None, since there's no subroutines in this module.


CONFIGURATION AND ENVIRONMENT

Mac::Apps::Seasonality::Constants requires no configuration files or environment variables.


DEPENDENCIES

the Readonly manpage


INCOMPATIBILITIES

None reported.


BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to bug-mac-apps-seasonality-loadicaohistory@rt.cpan.org, or through the web interface at http://rt.cpan.org.


AUTHOR

Elliot Shank perl@galumph.com


LICENSE AND COPYRIGHT

Copyright ©2006-2007, Elliot Shank perl@galumph.com. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See the perlartistic manpage.


DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

 Mac::Apps::Seasonality::Constants - Static definitions of aspects of Seasonality.