<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Catalyst::View::vCard - vCard view for Catalyst

SYNOPSIS
        # in a controller...
        my $profile = $foo;
    
        $c-&gt;stash-&gt;{ vcards }   = [ $profile ];
        $c-&gt;stash-&gt;{ filename } = $profile-&gt;username;
        $c-&gt;forward( $c-&gt;view( 'vCard' ) );
    
        # in a view...
        package MyApp::View:;vCard;
    
        use base qw( Catalyst::View::vCard );
    
        sub convert_to_vcard {
            my( $self, $c, $profile, $vcard ) = @_;
        
            $vcard-&gt;nickname( $profile-&gt;username );
            $vcard-&gt;fullname( $profile-&gt;name ) if $profile-&gt;name;
            $vcard-&gt;email( $profile-&gt;email ) if $profile-&gt;show_email;
        }

DESCRIPTION
    This is a view to help you serialize objects to vCard output. You can
    configure the output filename by supplying a name in "$c-"stash-&gt;{
    filename }&gt; (a ".vcf" extension will automatically added for you). A
    default "convert_to_vcard" implementation is provided, however you can
    provide your own to map your object to a Text::vCard object.

METHODS
  process( \@vcards )
    This method will loop through and call "convert_to_vcard" on all of the
    items in the "vcards" key of the stash.

  convert_to_vcard( $self, $c, $in, $out )
    This is a default implementation for converting your items to vCard
    objects. It will try various hash keys or methods based on the naming
    scheme of Text::vCard's methods.

AUTHOR
    Brian Cassidy &lt;bricas@cpan.org&gt;

COPYRIGHT AND LICENSE
    Copyright 2007 by Brian Cassidy

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

SEE ALSO
    * Catalyst
    * Text::vCard

</pre></body></html>