-
-
16 Apr 2012 21:20:13 UTC
- Distribution: KinoSearch
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (5)
- Testers (536 / 133 / 8)
- Kwalitee
Bus factor: 0- 85.27% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (852.87KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Marvin Humphrey <marvin at rectangular dot com>
- Dependencies
- JSON::XS
- Lingua::Stem::Snowball
- Lingua::StopWords
- Parse::RecDescent
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Clownfish::Symbol - Abstract base class for Clownfish symbols.
DESCRIPTION
Clownfish::Symbol serves as an abstract parent class for entities which may live in the global namespace, such as classes, functions, methods, and variables.
CONSTRUCTOR
my $symbol = MySymbol->new( parcel => 'Crustacean', # default: special exposure => 'parcel', # required class_name => 'Crustacean::Lobster', # default: undef class_cnick => undef, # default: special micro_sym => 'average_lifespan', # required );
parcel - A Clownfish::Parcel, or a string that can be used to create/retrieve one. If not supplied, will be assigned to the default Parcel.
exposure - The scope in which the symbol is exposed. Must be 'public', 'parcel', 'private', or 'local'.
class_name - A optional class name, consisting of one or more components separated by "::". Each component must start with a capital letter, contain at least one lower-case letter, and consist entirely of the characters [A-Za-z0-9].
class_cnick - The C nickname associated with the supplied class name. If not supplied, will be derived if possible from
class_name
by extracting the last class name component.micro_sym - The local identifier for the symbol.
OBJECT METHODS
get_parcel get_class_name get_class_cnick micro_sym
Getters.
get_prefix get_Prefix get_PREFIX
Get a string prefix, delegating to
parcel
member var.public parcel private local
if ( $sym->public ) { do_x() } elsif ( $sym->parcel ) { do_y() }
Indicate whether the symbol matches a given access level.
equals
do_stuff() if $sym->equals($other_sym);
Returns true if the symbols are "equal", false otherwise.
short_sym
# e.g. "Lobster_average_lifespan" print $symbol->short_sym;
Returns the C representation for the symbol minus the parcel's prefix.
full_sym
# e.g. "crust_Lobster_average_lifespan" print $symbol->full_sym;
Returns the fully qualified C representation for the symbol.
COPYRIGHT AND LICENSE
Copyright 2008-2011 Marvin Humphrey
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install KSx::Simple, copy and paste the appropriate command in to your terminal.
cpanm KSx::Simple
perl -MCPAN -e shell install KSx::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.