Net::Social::Mapper - utilities for dealing with internet persona
my $mapper = Net::Social::Mapper->new; my $persona = $mapper->persona('daveman692', 'livejournal'); print $persona->user; # daveman692 print $persona->service; # livejournal print $persona->domain; # livejournal.com print $persona->name; # LiveJournal # Print out any feeds available (if any exist) print "Feeds : ".join(", ", @feeds); # What type are the feed items print "Feeds contain : ".join(", ", $persona->types); # These other options may or may not be available print "Home page : ".$persona->homepage; print "Profile url : ".$persona->profile; print "Full Name : ".$persona->full_name; print "Service id : ".$persona->id; print "Photo url : ".$persona->photo; print "FOAF url : ".$persona->foaf; # If you have network access then you can query # who they are elsewhere on the web my @personas = $persona->elsewhere; # Other examples ... my $persona = $mapper->persona('daveman692', 'flickr'); print $persona->user; # daveman692 print $persona->id; # 36381329@N00 my $persona = $mapper->persona('http://davidrecordon.com'); print $persona->user; # http://davidrecordon.com print $persona->service; # website print $persona->domain; # davidrecordon.com my $persona = $mapper->persona('test@example.com'); print $persona->user; # test@example.com print $persona->service; # email print $persona->id; # test print $person->domain; # example.com # Moreover Net::Social::Mapper tries to work out the service from the url so that ... my $persona = $mapper->persona('http://daveman692.livejournal.com'); my $persona = $mapper->persona('http://daveman692.livejournal.com/data/rss'); my $persona = $mapper->persona('http://daveman692.livejournal.com/data/atom'); my $persona = $mapper->persona('http://www.livejournal.com/userinfo.bml?user=daveman692'); # ... all return print $persona->user; # daveman692 print $persona->service; # livejournal print $persona->domain; # livejournal.com print $persona->name; # LiveJournal
Get a new Net::Social::Mapper object.
Net::Social::Mapper
Return a Net::Social::Mapper::Persona object representing the user.
Net::Social::Mapper::Persona
Returns undef if it doesn't know anything about the service.
The Net::Social::Mapper::SiteMap object containing everything we know about various services.
Net::Social::Mapper::SiteMap
Return a hash of (lowercase) service names to classes;
Alternatively if you pass in a key, value pair then that will be added to the map.
Passing in undef as the value will delete the key.
undef
Get the contents of the url or undef on failure;
Simon Wistow <swistow@sixapart.com>
Copyright 2008, Six Apart Ltd.
Released under the same terms as Perl itself.
To install Net::Social::Mapper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Social::Mapper
CPAN shell
perl -MCPAN -e shell install Net::Social::Mapper
For more information on module installation, please visit the detailed CPAN module installation guide.